Activates the form and gives it focus.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Activating a form brings it to the front if this is the active application, or it flashes the window caption if this is not the active application. The form must be visible for this method to have any effect. To determine the active form in an application, use the ActiveForm property or the ActiveMdiChild property if your forms are in a Multiple-document interface (MDI) application.
The following code example demonstrates how to use the SetDesktopLocation, Load and members. To run the example, paste the following code in a form called Form1 containing a button called Button1 and two Label controls called Label1 and Label2.