Visual Basic Concepts

Marking a Property as the Properties Window Default

See Also

When you first place a new control instance on a form or other container, Visual Basic chooses a property to highlight the Properties window. This will be the same as the last property that was highlighted, if the new control has that property. Otherwise, Visual Basic uses the property marked as the user interface default.

If you don't specify this user interface default, Visual Basic highlights a property according to various internal criteria, such as the order in which you added properties to the type library.

To specify the user interface default for your control

  1. In the UserControl code window, place the cursor in one of the property procedures for the property.

  2. On the Tools menu, click Procedure Attributes to open the Procedure Attributes dialog box.

  3. The property should be shown in the Name box. If not, use the Name box to select it.

  4. Click the Advanced button to show advanced features. Check User Interface Default in the Attributes box, then click OK or Apply.

Tip   The best candidate for the user interface default is the property users will most often set. For example, the Interval property is the user interface default for the Timer control.