Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I make a form fullscreen at runtime?

Status
Not open for further replies.

PockyBum522

Programmer
Jun 10, 2003
239
US
How do I make a form fullscreen at runtime? So that there is no toolbar at the top.
 
use the set properties in your code in the form load section. For example: the width and height of the form etc.
 
Tried that, it restricts the maximum values to the height and width of the screen. I want the blue bar at the top with Minimise resize and maximise gone. Just a grey form...Filling the whole screen
 
Just set borderstyle to none and window state to maximized in the form's properties.
 
vbrocks is right...set the boderstyle to none and window state to maximized. Do this when the form loads:

Me.BorderStyle = 0
Me.WindowState = 2
Me.MaxButton = False
Me.MinButton = False
 
Private Sub Form_Load()
Me.BorderStyle = 0
Me.WindowState = 2
End Sub

Works great except for the bar at top is still there.

Me.MaxButton = False
Me.MinButton = False

That gives me an error:
Function or interface marked as restricted or the function uses a automation type not supported in visual basic.
 
jsut set all the properties you need in the properties window i.e. the borderstyle to none and MinButton and MaxButton to false, WindowStyle to Maximized. Try and experiment with the properties window and see what you come up with.
 
sub Full_Screen
Me.Top = 0
Me.Left = 0
Me.Height = Screen.Height
Me.Width = Screen.Width
Me.BorderStyle = 0
end sub

peterguhl@yahoo.de
 
I need to make a program that locks my computer unless you know the password, I want to know: Is there a way to block all keys except a-z? So the user can't alt+tab or any of the thousands of other things to get rid of it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top