If you are just now reading this, skip to EDITx5 portion of this post.
When I do the following things, the winform title bar does not disappear and instead hides itself behind and/or underneath the taskbar:
EDITx2 (changed the step order):
Setting the windows 10 screen resolution to 1920x1080.
Right click windows 10 task bar -> open task bar settings -> set 'Automatically hide the taskbar in desktop mode' to ON.
In winform constructor:
this.FormBorderStyle = FormBorderStyle.None; this.ShowInTaskbar = false;
program a minimizing and maximizing functionality for window automatically via a timer event.
Run the app.
Set the windows 10 screen resolution to 1280x800 while app is running.
Notice that there is a short-sized title bar placed behind task bar while the app is running when the app window is minimized.
What is weird is when I do the following, the above scenario does not happen and the title bar is hidden at all resolutions but the app is shown via a taskbar icon in the taskbar which is not desired:
this.FormBorderStyle = FormBorderStyle.None;
this.ShowInTaskbar = true;
The issue is perhaps related to windows needing to always have a window available for certain screen resolutions?
Trying to set all the form autosize, autoscale, etc properties does not work.
Why does this happen and how can I fix this?
Any help is much appreciated.
Thanks for reading.
EDIT:
To be more specific, setting this.FormBorderStyle = FormBorderStyle.None;
works but only at some screen resolutions like 1980x1080. If I do steps 1~7, there will be a small title bar placed behind the task bar.
Also, trying the following does not work either:
this.ControlBox = false;
this.Text = String.Empty;
this.FormBorderStyle = FormBorderStyle.FixedSingle;
this.ShowInTaskbar = false;
EDITx3:
Actually, initially running app while the screen res is at 1280x800, then minimizing and maximizing the window a few times with a timer event causes the title bar to just randomly appear under taskbar/ when task bar is hidden. I still have not found a solution to this even when doing this:
this.FormBorderStyle = FormBorderStyle.None;
this.ShowInTaskbar = false;
EDITx4
I apologize for constantly updating this question. Last thing I have discovered. Changing the scaling while the app is running from 125% to 100% makes that title bar randomly appear at the bottom left hand portion of my screen. These properties are set in the construtor:
this.FormBorderStyle = FormBorderStyle.None;
this.ShowInTaskbar = false;
EDITx5
Set pc resolution to anything (I was at 1920x1080). Set pc scaling setting to 100%. Put this in form constructor:
this.FormBorderStyle = FormBorderStyle.None;
this.ShowInTaskbar = false;
this.windowedState = formwindowstate.minimized;
Have a timer minimize and maximize the window state of the form or provide some way to minimize and maximize the form window in a timed manner. Then the title bar will appear randomly in the botton left portion of the screen even though it should be gone by setting the formborderstyle to none. This a bug in winforms? Can anyone else replicate this problem?