Visual Basic Concepts

Adding Descriptions for Your Objects

See Also

You can use the Object Browser to add descriptions and HelpContextIDs to your own procedures, modules, classes, properties, and methods. You may find these descriptions useful while working with your classes.

Note   You can also enter descriptions for properties, methods, and events using the Procedure Attributes dialog box, accessed from the Tools menu.

To enter description strings and link your classes and their members to Help topics

  1. Press F2 to open the Object Browser. In the Project/Library box, select your project.

  2. In the Classes list, right click the name of a class to bring up the context menu, and click Properties to open the Member Options dialog box.

    Alternatively, in the Members list you can right click the name of a property, method, or event you added to the class. On the context menu, click Properties. If the member is Private or Friend, this will open the Member Options dialog box. If the member is Public — that is, part of the class's interface — it will open the Procedure Attributes dialog box instead.

    Note   The difference between these two dialog boxes is that the Procedure Attributes dialog box has an Advanced button that can be used to make a member the default for the class, as described in "Making a Property or Method the Default" later in this chapter.

  3. In the Help Context ID box, type the context ID of the Help topic to be shown if you click the "?" button when this class or member is selected in the Object Browser.

    Note   You can create a Help file for your own use, and link topics to your classes and their members. To specify a Help file for your project, use the General tab of the Project Properties dialog box, accessed from the Project menu.

  4. In the Description box, type a brief description of the class or member.

  5. Click OK to return to the Object Browser. The description string you entered should appear in the description pane at the bottom of the browser.

  6. Repeat steps 2 through 5 for each class and for each member of each class.

Note   You cannot supply browser strings or Help topics for enumerations.

For More Information   Enumerations are introduced in "Using Enumerations to Work with Sets of Constants" in "More About Programming."