Full Screen

  • Thread starter Thread starter Ryan S. Thiele
  • Start date Start date
R

Ryan S. Thiele

Change the property 'Show In Taskbar' to False. (Hides it from showing in
the taskbar)
Change 'WindowState' to 'Maximized'. ( Will startup in the maximized
position.)

Is this what you need?

--
--
Thiele Enterprises - The Power Is In Your Hands Now!
--
Dear All,

Does someone have a clue as to how you can get a form to show show itself
"Full Screen"? Without Taskbar just a Form. Like Internet Explore if you
press F11?

Really need a solution

Regards

Richard
 
Dear All,

Does someone have a clue as to how you can get a form to show show itself
"Full Screen"? Without Taskbar just a Form. Like Internet Explore if you
press F11?

Really need a solution

Regards

Richard
 
Something like this. Form Keypreview is set to true.


Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyData = Keys.F11 Then
If Me.FormBorderStyle =
Windows.Forms.FormBorderStyle.None Then
Me.FormBorderStyle =
Windows.Forms.FormBorderStyle.None
Me.WindowState = FormWindowState.Maximized
Else
Me.FormBorderStyle =
Windows.Forms.FormBorderStyle.Sizable
Me.WindowState = FormWindowState.Normal
End If

End If
End Sub
 
Oops...
If e.KeyData = Keys.F11 Then
If Me.FormBorderStyle <> Windows.Forms.FormBorderStyle.None Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
etc..
 
No.... :( ... My Form is supposed to take over the whole screen...

So with other words... You will only see my Form and no Taskbar or any other
program. They may run in the background.

Thx a mil anyway
 
Richard said:
So with other words... You will only see my Form and no Taskbar or any other
program. They may run in the background.

I don't know what the most elegant VB-ish way is to do this. But the
following code works.

Public Class Form1

Private Declare Function SetWindowLong Lib "user32" Alias
"SetWindowLongA" (ByVal hwnd As IntPtr, ByVal id As Int32, ByVal style
As IntPtr) As IntPtr
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As
IntPtr, ByVal hWndInsertAfter As IntPtr, ByVal x As Int32, ByVal y As
Int32, ByVal cx As Int32, ByVal cy As Int32, ByVal wFlags As UInt32)
As Int32

Dim OldStyle As Long
Dim OldBounds As Drawing.Rectangle

Private Sub GoFullScreen_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
OldStyle = SetWindowLong(Me.Handle, -16, &H90000000)
SetWindowPos(Me.Handle, -1, 0, 0, 0, 0, &H23)
OldBounds = Me.Bounds
Me.Bounds = My.Computer.Screen.Bounds
End Sub

Private Sub RestoreToWindow_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles Button2.Click
SetWindowLong(Me.Handle, -16, OldStyle)
SetWindowPos(Me.Handle, -2, 0, 0, 0, 0, &H23)
Me.Bounds = OldBounds
End Sub
End Class
 
Hi Mudhead.

Nope :)

If the argument is true then the form maximizes but it doesn't go over the
complete screen. Tell me, is it just me or does noboddy understand me...

Go into your Internet Explorer and press F11 and see what happens. Now
........ I want the same.....

Regs,

Richard
 
Yeeeeeeeeeeeeeeeeeeeeeeeeeessssssssssssssssssssssssssssssssssss.....

Thanks a mil... now I want to see what my employees can do about this :)

Thanks a mil

Richard
 
Lucian.... Have a look at our discussions above... you will find a very
short example...works for me
 
Umm press the "windows" key :P
Richard said:
Yeeeeeeeeeeeeeeeeeeeeeeeeeessssssssssssssssssssssssssssssssssss.....

Thanks a mil... now I want to see what my employees can do about this :)

Thanks a mil

Richard
 
Back
Top