Rated
Read 49,116 times
Contents
Related Categories
Forms - Startup Position
Startup Position
You can set the startup position by changing the StartUpPosition
property. This can be set to:
0 - Manual (you specify the startup position by changing the
forms top and left properties)
1 - Center Screen (the form appears in the centre of the screen)
2 - Center Owner (the form appears in the centre of its owner window)
3 - Windows Default (the form appears in the windows default position)
You can also change the WindowState property. This will change whether
the form first appears normal, minimized or maximized.
James first started writing tutorials on Visual Basic in 1999 whilst starting this website (then known as VB Web). Since then, the site has grown rapidly, and James has written numerous tutorials, articles and reviews on VB, PHP, ASP and C#. In October 2003, James formed the company Developer Fusion Ltd, which owns this website, and also offers various development services. In his spare time, he's a 3rd year undergraduate studying Computer Science in the UK. He's also a Visual Basic MVP.
Comments
-
Posted by Bomb3rman on 02 Jul 2005
In my program I have two forms. The user is asked to input a number in my custom-made form (input box) which has "OK", "CANCEL" and the input textbox.
Basically the problem is if if the user press...
Posted by jawsper on 17 Feb 2005
true, i noticed that my tray icon doesnt disappear automatically, cause the unload method of the form its on isnt loaded...
ah well it works fine if you need to really [i]kill[/i] it i guess ;)
You don't really want to use End, as it forcefully terminates everything, rather than gracefully telling the forms that they're about to be closed (ie the Unload event), and then removing them from me...
Posted by jawsper on 17 Feb 2005
i know an even simpler method:
[code]
Public Sub CloseAll()
End
End Sub
[/code]
it works fine for me ;) -
Posted by Knoj on 31 May 2003
If you replace "vbModeless" with "vbModal" then no window below can be clicked on! Great for setting options.
|