Live Chat Icon For mobile
Live Chat Icon

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

Platform: WinForms| Category: Form

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

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.