다음을 통해 공유


Shape.ParentChanged 이벤트

Parent 속성 값이 변경되면 발생합니다.

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

구문

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

설명

Parent 속성에 설정할 수 있는 ShapeContainer.

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

예제

다음 예제에서는 이벤트 처리기에서 ParentChanged 이벤트에 응답하는 방법을 보여 줍니다.이 예제에서는 사용자가 있어야는 OvalShape 폼에 OvalShape1 이라는 컨트롤입니다.

Private Sub OvalShape1_ParentChanged() Handles OvalShape1.ParentChanged
    MsgBox("The shape has been moved to a new container.")
End Sub
private void ovalShape1_ParentChanged(object sender, System.EventArgs e)
{
    MessageBox.Show("The shape has been moved to a new container.");
}

.NET Framework 보안

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

참고 항목

참조

Shape 클래스

Microsoft.VisualBasic.PowerPacks 네임스페이스

기타 리소스

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

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

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