次の方法で共有


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

ページ上の指定された色の単一のポイントを出力します。オプションで、現在の座標を基準とするポイントを指定します。

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

構文

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

パラメーター

  • relativeStart
    型 : Boolean

    座標が (CurrentXCurrentY で設定されている) 現在のグラフィックスの位置に対する相対的な位置かどうかを示す Boolean 値。

  • 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 の実装と著しく異なる場合を除いて、これらの関数およびオブジェクトを使用する必要はありません。

次の例に CurrentXCurrentYによって設定され、指定された色のグラフィックスでの位置を基準とした時点を印刷する方法を示します。

Dim Printer As New Printer
Printer.CurrentX = 1000
Printer.CurrentY = 1000
Printer.PSet(True, 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