다음을 통해 공유


Shape.BorderColor 속성

도형 또는 선 컨트롤의 테두리 색을 가져오거나 설정 합니다.

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

구문

‘선언
<BrowsableAttribute(True)> _
Public Property BorderColor As Color
[BrowsableAttribute(true)]
public Color BorderColor { get; set; }
[BrowsableAttribute(true)]
public:
property Color BorderColor {
    Color get ();
    void set (Color value);
}
[<BrowsableAttribute(true)>]
member BorderColor : Color with get, set
function get BorderColor () : Color
function set BorderColor (value : Color)

속성 값

형식: System.Drawing.Color
A Color 는 도형 또는 행의 테두리 색을 나타내는 구조입니다.기본값은 DefaultBorderColor의 값입니다.

설명

LineShape 컨트롤은 BorderColor 줄의 색을 나타내는.

OvalShape 또는 RectangleShape 제어, BorderColor 셰이프의 바깥쪽 가장자리의 색을 나타내는.

예제

다음 예제 설정 하는 방법을 보여 줍니다는 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)