System.Windows.Forms.Form.SetDesktopBounds Method

Sets the bounds of the form in desktop coordinates.

Syntax

public void SetDesktopBounds (int x, int y, int width, int height)

Parameters

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

Remarks

Desktop coordinates are based on the working area of the screen, which excludes the taskbar. You can use this method to set the position and size of 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.

Requirements

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