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
Share with