System.Windows.Forms.Form.DesktopLocation Property

Gets or sets the location of the form on the Windows desktop.

Syntax

[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.Browsable(false)]
public System.Drawing.Point DesktopLocation { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Desktop coordinates are based on the working area of the screen, which excludes the taskbar. The coordinate system of the desktop is pixel based. If your application is running on a multimonitor system, the coordinates of the form are the coordinates for the combined desktop.

You can use this property to position your form relative to other forms and applications on the Windows desktop.

If you call the Form.SetDesktopLocation(int, int) method before calling the Form.Show(IWin32Window) method, your form will be positioned at its default location, which is determined by the operating system. For more information about window positioning, see the "Window Size and Position" section of the "Window Features" document in the MSDN library at http://msdn.microsoft.com/library.

If you call Form.SetDesktopLocation(int, int) after calling Form.Show(IWin32Window), your form will be positioned at the location you specified.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0