SimpleShape.SetBounds 메서드
도형의 범위를 특정된 위치와 크기를 설정합니다.
네임스페이스: Microsoft.VisualBasic.PowerPacks
어셈블리: Microsoft.VisualBasic.PowerPacks.Vs(Microsoft.VisualBasic.PowerPacks.Vs.dll)
구문
‘선언
Public Sub SetBounds ( _
left As Integer, _
top As Integer, _
width As Integer, _
height As Integer _
)
public void SetBounds(
int left,
int top,
int width,
int height
)
public:
void SetBounds(
int left,
int top,
int width,
int height
)
member SetBounds :
left:int *
top:int *
width:int *
height:int -> unit
public function SetBounds(
left : int,
top : int,
width : int,
height : int
)
매개 변수
- left
형식: System.Int32
- top
형식: System.Int32
- width
형식: System.Int32
새 너비 속성 값 셰이프입니다.
- height
형식: System.Int32
새 높이 속성 값 셰이프입니다.
설명
사용할 수 있는 SetBounds 셰이프의 크기와 위치에는 단일 문 변경 하는 방법입니다.
예제
다음 예제에서는 사용 하는 방법을 보여 줍니다 있는 SetBounds 의 크기와 셰이프의 위치를 변경 하는 방법.특히 셰이프 폼의 왼쪽 위 모서리를 이동 및 정사각형으로 변경 됩니다.이 예제에서는 사용자가 있어야는 RectangleShape 폼에 RectangleShape1 이라는 컨트롤입니다.
Private Sub RectangleShape1_Click() Handles RectangleShape1.Click
' Change the Bounds property.
RectangleShape1.SetBounds(0, 0, 100, 100)
End Sub
private void rectangleShape1_Click(System.Object sender, System.EventArgs e)
{
// Change the Bounds property.
rectangleShape1.SetBounds(0, 0, 100, 100);
}
.NET Framework 보안
- 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.
참고 항목
참조
Microsoft.VisualBasic.PowerPacks 네임스페이스
기타 리소스
Line 및 Shape 컨트롤 소개(Visual Studio)
방법: LineShape 컨트롤로 선 그리기(Visual Studio)
방법: OvalShape 및 RectangleShape 컨트롤을 사용하여 도형 그리기(Visual Studio)