This documentation is archived and is not being maintained.
Form.SetDesktopBounds Method
.NET Framework 1.1
Sets the bounds of the form in desktop coordinates.
[Visual Basic] Public Sub SetDesktopBounds( _ ByVal x As Integer, _ ByVal y As Integer, _ ByVal width As Integer, _ ByVal height As Integer _ ) [C#] public void SetDesktopBounds( int x, int y, int width, int height ); [C++] public: void SetDesktopBounds( int x, int y, int width, int height ); [JScript] public function SetDesktopBounds( x : int, y : int, width : int, height : int );
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
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also
Form Class | Form Members | System.Windows.Forms Namespace | SetDesktopLocation
Show: