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.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.