Howdy!
I am having a issue with getting my Win form app to go into fullscreen - Well sort of.
See if you exit after you enter then enter again it works just fine - But when you go into it the first time it sitll shows some of the taskbar.
(See below)
Code:Private Sub ToolStripButton5_Click(sender As Object, e As EventArgs) Handles ToolStripButton5.Click, FullScreenToolStripMenuItem.Click ToolStripButton5.Visible = False ControlBox = False Me.WindowState = FormWindowState.Maximized Me.Size = SystemInformation.PrimaryMonitorSize Me.WindowState = 2 Me.Location = New Point(0, 0) Me.TopMost = True Me.FormBorderStyle = 0 Me.TopMost = True ToolStripButton6.Visible = True End Sub 'Exit FullScreen. Private Sub ToolStripButton6_Click_1(sender As Object, e As EventArgs) Handles ToolStripButton6.Click, ExitFullScreenToolStripMenuItem.Click Me.WindowState = FormWindowState.Normal Me.Size = MaximumSize Me.FormBorderStyle = FormBorderStyle.Sizable ToolStripButton5.Visible = True ControlBox = True Me.TopMost = False ToolStripButton6.Visible = False End Sub
When you first load the application and every time - you have to go into - back out and back into fullscreen just for it to be right.
The code took me a few months to come up with. This being is because there is no native "Form.GoFullScreen"
Wished it was that easy - Sure there is a way for me to write a class maybe but rather not for now.
The code really isn't that hard to understand...But I just don't understand why it isn't working when I hit fullscreen the first time...
Some pictures:
Form load
1st FullScreen
2nd FullScreen
Updated the second screenshot to display fullscreen better




Reply With Quote