Full Screen

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
 
R

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
 
M

Mudhead

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
 
M

Mudhead

Oops...
If e.KeyData = Keys.F11 Then
If Me.FormBorderStyle <> Windows.Forms.FormBorderStyle.None Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
etc..
 
R

Richard

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
 
L

Lucian Wischik

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
 
R

Richard

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
 
R

Richard

Yeeeeeeeeeeeeeeeeeeeeeeeeeessssssssssssssssssssssssssssssssssss.....

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

Thanks a mil

Richard
 
R

Richard

Ok and now how to you cancel a key that was pressed?

lets say he may not press ALT+F4
 
R

Richard

Lucian.... Have a look at our discussions above... you will find a very
short example...works for me
 
C

C-Services Holland b.v.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top