Visual Studio Form Covering Windows Taskbar or Getting Behind Taskbar

Asked

Viewed 517 times

1

I have an application that uses the property Formborderstyle = None, however this happening that in windows 10 my status bar (statusBar) that is at the bottom is behind the taskbar and windows 7 ends up covering , what can I do to adjust the correct size?

1 answer

1


Try to set the maximum size for the window to be the safe area of work area. You will need to include the two references:

using System.Drawing;
using System.Windows.Forms;

And put these procedures in the time to load the Form:

Rectangle workingAreaRect = Screen.WorkingArea;
Size workingAreaSize = workingAreaRect.Size;

Form1.MaximumSize = workingAreaSize;
Form1.TopMost = false; // faz com que o Form não seja exibido na frente da Taskbar

These methods above will cause the size of the Form extends to the safe area of the monitor

  • 1

    It worked I did it! Thank you very much. Hug

Browser other questions tagged

You are not signed in. Login or sign up in order to post.