Control.Move Event

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Occurs when the control is moved.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public event EventHandler Move

For more information about handling events, see Handling and Raising Events.

The following code example uses the Move event to display the location of the form in screen coordinates on the caption bar of the form.

// 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();
}

.NET Framework
Available since 1.1
Return to top
Show: