Číst v angličtině

Sdílet prostřednictvím


Control.Move Událost

Definice

Generuje se při přesunutí ovládacího prvku.

public:
 event EventHandler ^ Move;
public event EventHandler Move;
public event EventHandler? Move;
member this.Move : EventHandler 
Public Custom Event Move As EventHandler 

Event Type

Příklady

Následující příklad kódu používá Move událost k zobrazení umístění formuláře v souřadnicích obrazovky na panelu popis formuláře.

   // 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

Poznámky

Další informace o zpracování událostí najdete v tématu Zpracování a vyvolávání událostí.

Platí pro

Produkt Verze
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

Viz také