Creating a Functional User Interface / Form StartPosition Property
Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.
Learn More
Subtitles of the Movie
In this movie we will use our Address Label Maker program one more time to discuss two of the properties associated with the entire form. Instead of each individual control, these two properties I'm going to mention are associated with the entire form. First, the start position, making sure that you have the form itself as the focus and you can tell this by looking at the top of the properties window and it should say Form 1 unless of course you've renamed the form which we'll discuss later. In the Form 1 properties the start position property has five different settings, manual, center screen, Windows default location, Windows default bounds, and center parent. We will see four of these since the center parent is dependent upon having multiple forms which will be discussed later also. When you choose manual as the start position you are asking Windows to allow you to adjust the start position of the form at run time in this manner. The project is running, it will start in the upper left corner of the screen and then of course you can readjust it or move it around however you want to at that point in time. You can also allow the user to adjust the height and width and overall size of the form itself. Returning to the start position, the center screen start position property when executed well just as you might expect will put the form in the middle of the screen in this manner, once again, the user is free to move this around so if you want your form to always start in the middle of the screen you would choose center screen as the form start position. Looking at the next start position which is Windows default location, when we execute, the Windows default location is wherever the Windows default location is for your computer, now this could vary slightly particularly when you change resolution of your monitor, but this will go to a specified location that is known as the Windows default location. Let's return one more time to the start position property for the form and this time we will select Windows default bounds. Now when I execute this with the start position as Windows default bounds you will notice that the form has now changed size. There is a default size that is associated within the Visual Studio environment that will assume that your form should take on this size unless you otherwise specified. So typically you would use one of the following properties for your Windows startup position, for your form startup position, you typically would use manual, center screen, or Windows default location. As I mentioned earlier center parent will be used when we have multiple forms. Now there is one other property that we want to take a look at and that is the window state property, by default the window state property is normal and that's what you've been seeing in all these demonstrations. If on the other hand, you would like for the window upon startup to become minimized that is to be put down in the system tray, available but minimized you could choose minimized. If you select maximized then when you run the program, just as you might expect the window would be automatically maximized as if the user clicked the maximize button. And here you see an example of maximized window, of course the user could choose the restore button and restore it down to its default size.
Tutorial Information
| Course: | Microsoft Visual Basic 2005 |
| Author: | Arthur Lee |
| SKU: | 33940 |
| ISBN: | 1-935320-10-6 |
| Release Date: | 2008-11-19 |
| Duration: | 7.5 hrs / 97 lessons |
| Work Files: |
Yes |
| Captions: | Available on CD and Online University |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 98,729 Video Tutorials (23,265 free)
- Video Available as Flash or QuickTime
- Over 1026 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 