Control.OnMove(EventArgs) 메서드

정의

Move 이벤트를 발생시킵니다.

protected:
 virtual void OnMove(EventArgs ^ e);
protected virtual void OnMove(EventArgs e);
abstract member OnMove : EventArgs -> unit
override this.OnMove : EventArgs -> unit
Protected Overridable Sub OnMove (e As EventArgs)

매개 변수

e
EventArgs

EventArgs 이벤트 데이터가 들어 있는 항목입니다.

예제

다음 코드 예제에서는 이벤트를 사용 하 여 Move 폼의 캡션 표시줄에 화면 좌표에서 폼의 위치를 표시 합니다.

   // The following example displays the location of the form in screen coordinates
   // on the caption bar of the form.
private:
   void Form1_Move( Object^ /*sender*/, System::EventArgs^ /*e*/ )
   {
      this->Text = String::Format( "Form screen position = {0}", this->Location );
   }
// The following example displays the location of the form in screen coordinates
// on the caption bar of the form.
private void Form1_Move(object sender, System.EventArgs e)
{
    this.Text = "Form screen position = " + this.Location.ToString();
}
' The following example displays the location of the form in screen coordinates
' on the caption bar of the form.
Private Sub Form1_Move(sender As Object, e As System.EventArgs) Handles MyBase.Move
    Me.Text = "Form screen position = " + Me.Location.ToString()
End Sub

설명

이벤트를 발생시키는 경우 대리자를 통해 이벤트 처리기가 호출됩니다. 자세한 내용은 이벤트 처리 및 발생을 참조하세요.

또한 이 OnMove 메서드를 사용하면 파생 클래스가 대리자를 연결하지 않고도 이벤트를 처리할 수 있습니다. 파생 클래스에서 이벤트를 처리하기 위한 기본 설정 기술입니다.

상속자 참고

파생 클래스에서 재정의하는 OnMove(EventArgs) 경우 등록된 대리자가 이벤트를 받도록 기본 클래스의 OnMove(EventArgs) 메서드를 호출해야 합니다.

적용 대상

추가 정보