Printer.RightToLeft 屬性
取得或設定 Boolean 值,指出在由右至左系統上的文字顯示方向。
命名空間: Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6
組件: Microsoft.VisualBasic.PowerPacks.Vs (在 Microsoft.VisualBasic.PowerPacks.Vs.dll 中)
語法
'宣告
Public Property RightToLeft As Boolean
public bool RightToLeft { get; set; }
public:
property bool RightToLeft {
bool get ();
void set (bool value);
}
member RightToLeft : bool with get, set
function get RightToLeft () : boolean
function set RightToLeft (value : boolean)
屬性值
類型:Boolean
傳回 Boolean。
備註
若傳回值為 true時, Printer 物件在右至左的作業系統上執行,例如 Windows 阿拉伯文或希伯來文視窗。 文字由右至左執行。
若傳回值為 false時, Printer 物件在左到右的作業系統上執行,例如英文的視窗,因此,文字由左至右執行。 如果容器不實作這個環境屬性,這是預設值。
注意事項 |
---|
Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 命名空間中的函式和物件都是供這些工具使用,以便從 Visual Basic 6.0 升級至 Visual Basic。在大多數情況下,這些函式和物件會複製在 .NET Framework 的其他命名空間中可以找到的功能。只有當 Visual Basic 6.0 程式碼模型與 .NET Framework 實作有顯著差異時,才需要這些項目。 |
範例
下列範例示範如何擷取 RightToLeft 屬性值。
Dim Printer As New Printer
If Printer.RightToLeft = True Then
Printer.Print("Printing from right to left.")
Else
Printer.Print("Printing from left to right.")
End If
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