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 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.