VB.NET Developer's Guide

Manipulating Windows Forms

When you add a Windows form to your project, many of the form s properties are set to commonly used values by default. For example, the Opacity property is set to 100% by default because forms are generally opaque and not transparent. Also, the TopMost property is set to False by default because inactive forms are not commonly above other forms. Although these values are convenient, they will not always suit your needs. For example, a Help window often allows the user to make it stay on top of other windows. Let s look at how to change the properties of a form.

Properties of Windows Forms

You can change the properties of a form at design time or at runtime. You can virtually avoid compile-time errors by changing properties by point-and-click at design time. Also, changing properties at design time by using the Properties window is often quicker. For example, you could change the font used to display text on a form by following these steps:

  1. From the View menu, click Properties Window.
  2. In the Properties Window, click Font and then click the ellipsis box.
  3. In the Font dialog box, select the appropriate settings.

Because the Font property consists of many subproperties, quickly changing it at design time is convenient. Similarly, you can use the Properties window to change other properties at design time.

At times, you will want to manipulate a form based on a user input. Like other properties,...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Opacity Sensors and Instruments
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.