次の方法で共有


Visual Basic Concepts

Browsing ActiveX Component Type Libraries

If an ActiveX component provides a type library, you can use the Object Browser to view the component's classes, as well as the properties, methods, events, and constants associated with the objects of each class.

To view the classes available in an ActiveX Component's type library

  1. If you haven't already done so, add a reference to the type library to your Visual Basic project.

    For more information, see "Creating a Reference to an Object," later in this chapter.

  2. Open the Object Browser and select the name of the type library from the Project/Library list.

    The Object Browser displays the available classes in the Classes list.

Figure 10.2   The Object Browser

For example, to view the classes available in the Data Access Object (DAO) type library, add a reference to the library in the References dialog box, then select DAO in the Project/Library list in the Object Browser.

To view the members of a class

  • Select the name of the class from the Classes list in the Object Browser.

    The Object Browser displays the members of the class in the Members of list.

If you're looking for information about a particular class or member in a type library, use the Object Browser's Search feature.

To use the Search feature

  • Type what you're looking for in the Search Text box, and then click the Search button.

    The Object Browser displays a Search Results box showing the libraries, classes, and members returned by the search.