次の方法で共有


Printer.PSet メソッド (Single, Single, Int32)

ページ上の指定された色の単一のポイントを出力します。

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

構文

'宣言
Public Sub PSet ( _
    x As Single, _
    y As Single, _
    color As Integer _
)
public void PSet(
    float x,
    float y,
    int color
)
public:
void PSet(
    float x, 
    float y, 
    int color
)
member PSet : 
        x:float32 * 
        y:float32 * 
        color:int -> unit
public function PSet(
    x : float, 
    y : float, 
    color : int
)

パラメーター

  • x
    型 : Single

    印刷する点の水平座標を示す Single 値。

  • y
    型 : Single

    印刷する点の垂直座標を示す Single 値。

  • color
    型 : Int32

    省略可能。 点に指定された RGB (赤、緑、青) の色を示す Integer 値。 このパラメーターが省略された場合は、現在の ForeColor プロパティの設定が使用されます。

解説

出力されるの DrawWidth プロパティを設定して、ポイントのサイズが決まります。 DrawWidth が 1 に設定されている場合、PSet は指定された色で時刻を出力します。 DrawWidth が 1 を超えると、点は指定された座標について説明します。

ポイントが印刷される方法は DrawStyle のプロパティの設定によって異なります。

PSet を実行すると、CurrentXCurrentY のプロパティは引数で指定された位置に設定されます。

注意

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

次の例では、指定された色の組み合わせを印刷する方法を示します。

Dim Printer As New Printer
Printer.PSet(500, 500, vbRed)
Printer.EndDoc()

.NET Framework セキュリティ

  • 直前の呼び出し元に対する完全な信頼。このメンバーは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

関連項目

Printer クラス

PSet オーバーロード

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