JerberSoft

hello there! can i know how can i program the form to occupy the whole screen when loaded. or if there are properties of the form then what is it thanks in advance!


Re: Visual Basic Express Edition making the form occupy whole screen

JerberSoft

oh, sorry, i think this is it..

Private Sub SwipeForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Me.Height = Screen.PrimaryScreen.Bounds.Height

Me.Width = Screen.PrimaryScreen.Bounds.Width

Me.Top = 0

Me.Left = 0

End Sub






Re: Visual Basic Express Edition making the form occupy whole screen

ReneeC

 

Or

 

Me.Size = New Size( Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height)
Me.Location = new point(0,0)

And it depends on whether you want to cover the toolbars. If you don't want to cover the tools bars, use WorkingArea






Re: Visual Basic Express Edition making the form occupy whole screen

djshades2004

how about setting the form1.windowstate

eg form1.windowstate = maximized





Re: Visual Basic Express Edition making the form occupy whole screen

JerberSoft

oh thanks to your replies! it really helps.

i have another question, how can i lock the form in which i can't move the form when it loads does anybody know this thanks in advance!





Re: Visual Basic Express Edition making the form occupy whole screen

ReneeC

One way to do it is to make a form move event handler and when ever there is movement

Me.location = new point(0,0)

That'll lock it up but good!






Re: Visual Basic Express Edition making the form occupy whole screen

spotty

Another is to remove the titlebar by setting to formborderstyle to none





Re: Visual Basic Express Edition making the form occupy whole screen

JerberSoft

are there any more techniques because when i drag the form, the layout appears and i dont want it that way, i want it clean. are there any more :-) thanks ReneeC!