Control.Move Event

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Occurs when the control is moved.

C#
public event EventHandler Move;
C#
public event EventHandler? Move;

Event Type

Examples

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.

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

Remarks

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

Applies to

Produkt Verzie
.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

See also