Visual Basic 6 provides a monitor icon in the lower right
corner of the development environment that shows the position and size of the
current form on the screen. You can drag the miniature form icon to change its
position, which changes the Top and Left properties accordingly. The virtual
screen on this monitor icon has the same pixel resolution as your actual
screen.
Many VB programmers aren’t aware that you can access two
handy tools by right-clicking the icon and selecting from the popup menu. If
you select the Resolution Guides command, it will display dotted lines for
lower resolutions. For example, my screen is 1280×1024 pixels and I get
resolution guides for 1024×768, 800×600, and 640×480. These guides are useful
when you want to size and position your forms to work well on the widest
possible variety of video hardware.
The other useful command on this menu is Startup Position.
By default this is Manual, which means the form displays initially at the
position you drag it to during design. Your other choices are Center Screen,
Center Owner, and Windows Default.
These commands are yet another example of how VB makes the
programmer’s life easier.
Advance your scripting skills to the next level with TechRepublic’s free Visual Basic newsletter, delivered each Friday. Automatically sign up today!