Font.FromLogFont 方法
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
Font從指定的 GDI 邏輯字型 () LOGFONT
結構建立 。
FromLogFont(LOGFONT, IntPtr) | |
FromLogFont(Object, IntPtr) |
Font從指定的 GDI 邏輯字型 () |
FromLogFont(LOGFONT) | |
FromLogFont(Object) |
Font從指定的 GDI 邏輯字型 () |
- 來源:
- Font.cs
- 來源:
- Font.cs
public:
static System::Drawing::Font ^ FromLogFont(System::Drawing::Interop::LOGFONT % logFont, IntPtr hdc);
C#
public static System.Drawing.Font FromLogFont (in System.Drawing.Interop.LOGFONT logFont, IntPtr hdc);
static member FromLogFont : LOGFONT * nativeint -> System.Drawing.Font
Public Shared Function FromLogFont (ByRef logFont As LOGFONT, hdc As IntPtr) As Font
參數
- logFont
- LOGFONT
- hdc
-
IntPtr
nativeint
傳回
適用於
Windows Desktop 9 和 Windows Desktop 8
產品 | 版本 |
---|---|
Windows Desktop | 8, 9 |
- 來源:
- Font.cs
- 來源:
- Font.cs
- 來源:
- Font.cs
Font從指定的 GDI 邏輯字型 () LOGFONT
結構建立 。
public:
static System::Drawing::Font ^ FromLogFont(System::Object ^ lf, IntPtr hdc);
C#
public static System.Drawing.Font FromLogFont (object lf, IntPtr hdc);
static member FromLogFont : obj * nativeint -> System.Drawing.Font
Public Shared Function FromLogFont (lf As Object, hdc As IntPtr) As Font
參數
- hdc
-
IntPtr
nativeint
含有 lf
結構相關額外資訊的裝置內容控制代碼。
傳回
這個方法建立的 Font。
例外狀況
字型不是 TrueType 字型。
備註
GDI LOGFONT
或邏輯字型是結構,其中包含描述特定字型的14個屬性。
適用於
.NET Framework 4.8.1 及其他版本
產品 | 版本 |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
- 來源:
- Font.cs
- 來源:
- Font.cs
public:
static System::Drawing::Font ^ FromLogFont(System::Drawing::Interop::LOGFONT % logFont);
C#
public static System.Drawing.Font FromLogFont (in System.Drawing.Interop.LOGFONT logFont);
static member FromLogFont : LOGFONT -> System.Drawing.Font
Public Shared Function FromLogFont (ByRef logFont As LOGFONT) As Font
參數
- logFont
- LOGFONT
傳回
適用於
Windows Desktop 9 和 Windows Desktop 8
產品 | 版本 |
---|---|
Windows Desktop | 8, 9 |
- 來源:
- Font.cs
- 來源:
- Font.cs
- 來源:
- Font.cs
Font從指定的 GDI 邏輯字型 () LOGFONT
結構建立 。
public:
static System::Drawing::Font ^ FromLogFont(System::Object ^ lf);
C#
public static System.Drawing.Font FromLogFont (object lf);
static member FromLogFont : obj -> System.Drawing.Font
Public Shared Function FromLogFont (lf As Object) As Font
參數
傳回
這個方法建立的 Font。
備註
GDI LOGFONT
或邏輯字型是結構,其中包含描述特定字型的14個屬性。
適用於
.NET Framework 4.8.1 及其他版本
產品 | 版本 |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |