LineShape コンストラクター (Int32, Int32, Int32, Int32)
新しいインスタンスを初期化、LineShapeクラス、行の座標を指定することです。
名前空間: Microsoft.VisualBasic.PowerPacks
アセンブリ: Microsoft.VisualBasic.PowerPacks.Vs (Microsoft.VisualBasic.PowerPacks.Vs.dll 内)
構文
'宣言
Public Sub New ( _
x1 As Integer, _
y1 As Integer, _
x2 As Integer, _
y2 As Integer _
)
public LineShape(
int x1,
int y1,
int x2,
int y2
)
public:
LineShape(
int x1,
int y1,
int x2,
int y2
)
new :
x1:int *
y1:int *
x2:int *
y2:int -> LineShape
public function LineShape(
x1 : int,
y1 : int,
x2 : int,
y2 : int
)
パラメーター
x1
型 : Int32直線の開始点の X (水平) 座標。
y1
型 : Int32直線の開始点の Y (垂直) 座標。
x2
型 : Int32直線の終了点の X (水平) 座標。
y2
型 : Int32直線の終了点の Y (垂直) 座標。
解説
ALineShapeフォームまたはコンテナー コントロールの場合は、上で直接表示することはできません上でホストする必要があります、ShapeContainerオブジェクトです。 初期化した後、 LineShape、設定する必要がそのParentプロパティのいずれかに、既存ShapeContainerの新しいインスタンスをまたはShapeContainerです。
例
次の例を初期化します、ShapeContainerとLineShape、設定、Parentのプロパティ、LineShapeをShapeContainer、座標を指定して、斜めの線が表示されます。
Dim canvas As New Microsoft.VisualBasic.PowerPacks.ShapeContainer
Dim line1 As New Microsoft.VisualBasic.PowerPacks.LineShape(0,
0, 1000, 1000)
' Set the form as the parent of the ShapeContainer.
canvas.Parent = Me
' Set the ShapeContainer as the parent of the LineShape.
line1.Parent = canvas
Microsoft.VisualBasic.PowerPacks.ShapeContainer canvas =
new Microsoft.VisualBasic.PowerPacks.ShapeContainer();
Microsoft.VisualBasic.PowerPacks.LineShape line1 =
new Microsoft.VisualBasic.PowerPacks.LineShape(0, 0, 1000, 1000);
// Set the form as the parent of the ShapeContainer.
canvas.Parent = this;
// Set the ShapeContainer as the parent of the LineShape.
line1.Parent = canvas;
.NET Framework セキュリティ
- 直前の呼び出し元に対する完全な信頼。このメンバーは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。
参照
関連項目
Microsoft.VisualBasic.PowerPacks 名前空間
その他の技術情報
方法 : OvalShape コントロールおよび RectangleShape コントロールを使用して図形を描画する (Visual Studio)