다음을 통해 공유


Shape.BorderWidth 속성

선 또는 셰이프 컨트롤의 테두리 너비를 가져오거나 설정 합니다.

네임스페이스:  Microsoft.VisualBasic.PowerPacks
어셈블리:  Microsoft.VisualBasic.PowerPacks.Vs(Microsoft.VisualBasic.PowerPacks.Vs.dll)

구문

‘선언
<BrowsableAttribute(True)> _
Public Overridable Property BorderWidth As Integer
[BrowsableAttribute(true)]
public virtual int BorderWidth { get; set; }
[BrowsableAttribute(true)]
public:
virtual property int BorderWidth {
    int get ();
    void set (int value);
}
[<BrowsableAttribute(true)>]
abstract BorderWidth : int with get, set
[<BrowsableAttribute(true)>]
override BorderWidth : int with get, set
function get BorderWidth () : int
function set BorderWidth (value : int)

속성 값

형식: System.Int32
Integer 테두리 너비 (픽셀 단위)를 표시 합니다.기본값은 1입니다.

설명

LineShape 컨트롤을 BorderWidth 선의 두께 나타냅니다.

OvalShape 또는 RectangleShape 제어, BorderWidth 셰이프의 바깥쪽 가장자리의 두께 나타냅니다.

예제

다음 예제 설정 하는 방법을 보여 줍니다는 BorderColor, BorderStyle, 및 BorderWidth 속성에는 OvalShape 타원 3 픽셀 너비가 빨간색 점선 테두리를 표시 하는 컨트롤.

Dim OvalShape1 As New OvalShape
Dim canvas As New ShapeContainer
' Set the form as the parent of the ShapeContainer.
canvas.Parent = Me
' Set the ShapeContainer as the parent of the OvalShape.
OvalShape1.Parent = canvas
' Change the color of the border to red.
OvalShape1.BorderColor = Color.Red
' Change the style of the border to dotted.
OvalShape1.BorderStyle = Drawing2D.DashStyle.Dot
' Change the thickness of the border to 3 pixels.
OvalShape1.BorderWidth = 3
OvalShape1.Size = New Size(300, 200)
OvalShape ovalShape1 = new OvalShape();
ShapeContainer canvas = new ShapeContainer();
// Set the form as the parent of the ShapeContainer.
canvas.Parent = this;
// Set the ShapeContainer as the parent of the OvalShape.
ovalShape1.Parent = canvas;
// Change the color of the border to red.
ovalShape1.BorderColor = Color.Red;
// Change the style of the border to dotted.
ovalShape1.BorderStyle = System.Drawing.Drawing2D.DashStyle.Dot;
// Change the thickness of the border to 3 pixels.
ovalShape1.BorderWidth = 3;
ovalShape1.Size = new Size(300, 200);

.NET Framework 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

Shape 클래스

Microsoft.VisualBasic.PowerPacks 네임스페이스

기타 리소스

방법: LineShape 컨트롤로 선 그리기(Visual Studio)

방법: OvalShape 및 RectangleShape 컨트롤을 사용하여 도형 그리기(Visual Studio)

Line 및 Shape 컨트롤 소개(Visual Studio)