Form Visual Studio Covering the Windows Taskbar or Behind the Taskbar

1

I have an application that uses the property FormBorderStyle = none, but this is happening in windows 10 my statusbar (statusbar) that is at the bottom is behind the taskbar and windows 7 ends up covering, what can I do to adjust to the correct size?

    
asked by anonymous 30.05.2018 / 05:27

1 answer

1

Try to set the maximum size for the window to be secure desktop area . You will need to include both references:

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

And put these procedures at the time of loading 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 Form size to extend to the monitor safe area

    
30.05.2018 / 05:53