Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Control::Move Event

 

Occurs when the control is moved.

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

public:
event EventHandler^ Move {
	void add(EventHandler^ value);
	void remove(EventHandler^ value);
}

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 = String::Format( "Form screen position = {0}", this->Location );
   }

.NET Framework
Available since 1.1
Return to top
Show: