共用方式為


Printer.CurrentY 屬性

取得或設定下一個列印或繪圖方法的垂直座標。

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

語法

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

屬性值

類型:Single
傳回 Single。

備註

座標從頁面左上角開始測量。 CurrentX 屬性設定為 0 位於頁面的左邊緣,,而 CurrentY 屬性設定為 0 位於頁面的上邊緣。 座標是以 Twip 或 ScaleHeightScaleWidthScaleLeftScaleTopScaleMode 屬性以定義目前的度量單位。

當您如下表所示呼叫下列方法 PrinterCurrentX 和 CurrentY 設定變更。

這個方法

將 CurrentX, CurrentY

Circle

物件的中心。

EndDoc

0, 0

Line

行的終點。

NewPage

0, 0

Print

下一個列印位置。

PSet

繪製的點。

注意事項注意事項

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

範例

下列範例示範如何設定 CurrentX 和 CurrentY 屬性。 在這種情況下,它會列印文字 500 Twip 網頁和 500 Twip 的從上邊緣從頁面左邊緣。

Dim Printer As New Printer
Printer.CurrentX = 500
Printer.CurrentY = 500
Printer.Print("Hello")
Printer.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