Form.SetDesktopLocation Method
Sets the location of the form in desktop coordinates.
Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Parameters
- x
- Type: System.Int32
The x-coordinate of the form's location.
- y
- Type: System.Int32
The y-coordinate of the form's location.
Desktop coordinates are based on the working area of the screen, which excludes the taskbar. You can use this method to position your form on the desktop. Since desktop coordinates are based on the working area of the form, you can use this method to ensure that your form is completely visible on the desktop. This method is intended to be used primarily for top-level forms; use the LayoutMdi method to position multiple-document interface (MDI) child forms.
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.