System.Windows.Forms.Form.SetDesktopLocation Method

Sets the location of the form in desktop coordinates.

Syntax

public void SetDesktopLocation (int x, int y)

Parameters

x
The x-coordinate of the form's location.
y
The y-coordinate of the form's location.

Remarks

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 Form.LayoutMdi(MdiLayout) method to position multiple-document interface (MDI) child forms.

Requirements

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