Printer.DrawWidth 屬性
取得或設定圖形方法輸出的線條寬度。
命名空間: Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6
組件: Microsoft.VisualBasic.PowerPacks.Vs (在 Microsoft.VisualBasic.PowerPacks.Vs.dll 中)
語法
'宣告
Public Property DrawWidth As Short
public short DrawWidth { get; set; }
public:
property short DrawWidth {
short get ();
void set (short value);
}
member DrawWidth : int16 with get, set
function get DrawWidth () : short
function set DrawWidth (value : short)
屬性值
類型:Int16
傳回 Short。
備註
將這個屬性值將這個寬度 (或粗細,行。 如果 DrawWidth 屬性設定為超過 1 時, DrawStyle 屬性設定為 1 到 4 會產生實線 (而且 DrawStyle 屬性值不會變更)。 將 DrawWidth 設定為 1 可讓 DrawStyle 會在 DrawStyle 屬性資料表中顯示的結果。
![]() |
---|
Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 命名空間中的函式和物件都是供這些工具使用,以便從 Visual Basic 6.0 升級至 Visual Basic。在大多數情況下,這些函式和物件會複製在 .NET Framework 的其他命名空間中可以找到的功能。只有當 Visual Basic 6.0 程式碼模型與 .NET Framework 實作有顯著差異時,才需要這些項目。 |
範例
下列範例示範如何設定 DrawWidth 屬性。
Dim Printer As New Printer
Printer.CurrentX = 500
Printer.CurrentY = 500
Printer.DrawWidth = 4
Printer.Line(1000, 500)
Printer.EndDoc()
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。
請參閱
參考
Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 命名空間
其他資源
How to: Fix Upgrade Errors by Using the Printer Compatibility Library (Visual Basic)
Deploying Applications That Reference the Printer Compatibility Library