次の方法で共有


Printer.TwipsPerPixelX プロパティ

水平に測定されるオブジェクトのピクセルあたりの twip 単位の数を示す値を取得します。

名前空間:  Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6
アセンブリ:  Microsoft.VisualBasic.PowerPacks.Vs (Microsoft.VisualBasic.PowerPacks.Vs.dll 内)

構文

'宣言
Public ReadOnly Property TwipsPerPixelX As Single
public float TwipsPerPixelX { get; }
public:
property float TwipsPerPixelX {
    float get ();
}
member TwipsPerPixelX : float32 with get
function get TwipsPerPixelX () : float

プロパティ値

型 : Single
Single を返します。

解説

.NET Framework では、通常、ピクセルの測定値が必要です。 Printer オブジェクトの ScaleMode プロパティの設定を変更せずに測定単位を一度に変換するには、これらのプロパティを使用できます。

注意

Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 名前空間の関数とオブジェクトは、Visual Basic 6.0 から Visual Basic へのアップグレード ツールで使用するために用意されています。ほとんどの場合、これらの関数とオブジェクトは、.NET Framework の他の名前空間にある機能と重複しています。Visual Basic 6.0 のコード モデルが .NET Framework の実装と著しく異なる場合を除いて、これらの関数およびオブジェクトを使用する必要はありません。

次の例に TwipsPerPixelX と TwipsPerPixelY のプロパティを設定する方法を示します。

Dim Printer As New Printer
Dim vertical As Single
Dim horizontal As Single
horizontal = Printer.TwipsPerPixelX
vertical = Printer.TwipsPerPixelY
Printer.Print(CStr(vertical) & " by " & CStr(horizontal))
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