共用方式為


Printer.FontSize 屬性

取得或設定執行階段列印作業中之文字所用的字型大小。

命名空間:  Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6
組件:  Microsoft.VisualBasic.PowerPacks.Vs (在 Microsoft.VisualBasic.PowerPacks.Vs.dll 中)

語法

'宣告
Public Property FontSize As Single
public float FontSize { get; set; }
public:
property float FontSize {
    float get ();
    void set (float value);
}
member FontSize : float32 with get, set
function get FontSize () : float 
function set FontSize (value : float)

屬性值

類型:Single
傳回 Single。

備註

使用這個屬性來格式化中您想要的字型大小。 系統會決定預設值。 從預設要變更,請指定字型 (以點為單位) 的大小。

FontSize 的最大值為 2160 點。

注意事項注意事項

Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 命名空間中的函式和物件都是供這些工具使用,以便從 Visual Basic 6.0 升級至 Visual Basic。在大多數情況下,這些函式和物件會複製在 .NET Framework 的其他命名空間中可以找到的功能。只有當 Visual Basic 6.0 程式碼模型與 .NET Framework 實作有顯著差異時,才需要這些項目。

範例

下列範例示範如何設定 FontSize 屬性。

Dim pr As New Printer
pr.Print("This is the default font size")
pr.FontSize = 20
pr.Print("This is a 20 point font")
pr.EndDoc()

.NET Framework 安全性

請參閱

參考

Printer 類別

Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 命名空間

其他資源

Printer Compatibility Library

How to: Fix Upgrade Errors by Using the Printer Compatibility Library (Visual Basic)

Deploying Applications That Reference the Printer Compatibility Library