다음을 통해 공유


SimpleShape.Resize 이벤트

도형의 크기가 변경 될 때 발생 합니다.

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

구문

‘선언
<BrowsableAttribute(True)> _
Public Event Resize As EventHandler
[BrowsableAttribute(true)]
public event EventHandler Resize
[BrowsableAttribute(true)]
public:
 event EventHandler^ Resize {
    void add (EventHandler^ value);
    void remove (EventHandler^ value);
}
[<BrowsableAttribute(true)>]
member Resize : IEvent<EventHandler,
    EventArgs>
JScript에서는 이벤트를 지원하지 않습니다.

설명

이 이벤트는 프로그래밍 방식으로 수정 되거나 사용자 상호 작용으로 도형의 크기가 변경 되 면 발생 합니다.

이벤트를 처리하는 방법에 대한 자세한 내용은 이벤트 사용을 참조하십시오.

예제

다음 예제에서는 이벤트 처리기에서 Resize 이벤트에 응답하는 방법을 보여 줍니다.이 예제에서는 두 대가 필요 RectangleShape 컨트롤 폼에 RectangleShape1 및 RectangleShape2 라는.

Private Sub RectangleShape1_Resize() Handles RectangleShape1.Resize
    ' If the second rectangle intersects with the first, move it.
    If RectangleShape1.ClientRectangle.IntersectsWith( 
      RectangleShape2.ClientRectangle) Then
        RectangleShape2.Location = New Point(RectangleShape1.Right, 
          RectangleShape1.Bottom)
    End If
End Sub
private void rectangleShape1_Resize(object sender, System.EventArgs e)
{
    // If the second rectangle intersects with the first, move it.
    if (rectangleShape1.ClientRectangle.IntersectsWith(rectangleShape2.ClientRectangle))
    {
        rectangleShape2.Location = new Point(rectangleShape1.Right, 
            rectangleShape1.Bottom);
    }
}

.NET Framework 보안

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

참고 항목

참조

SimpleShape 클래스

Microsoft.VisualBasic.PowerPacks 네임스페이스

기타 리소스

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

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

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