32.18 How can I make my form cover the whole screen including the TaskBar?


The following code snippet demonstrates how you can make your form cover the whole screen including the Windows Taskbar.

[C#]
// Prevent form from being resized.
this.FormBorderStyle = FormBorderStyle.FixedSingle;
// Get the screen bounds
Rectangle formrect = Screen.GetBounds(this);
// Set the form's location and size
this.Location = formrect.Location;
this.Size = formrect.Size;

[VB.NET]
' Prevent form from being resized.
Me.FormBorderStyle = FormBorderStyle.FixedSingle
' Get the screen bounds
Dim formrect As Rectangle = Screen.GetBounds(Me)
' Set the form's location and size
Me.Location = formrect.Location
Me.Size = formrect.Size


© 2001-2010 Copyright Syncfusion Inc. All rights reserved.  |  Privacy Policy  |  Contact  |  Sitemap