Compartir a través de


How to: Run the Class Browser

You can run multiple instances of the Class Browser at the same time.

To run the Class Browser

  • On the Tools menu, choose Class Browser.

For more information, see Class Browser Window and Class Browser Buttons.

To run the Class Browser programmatically

  • In the Command window, use the DO command with the _BROWSER system variable, which specifies the name of the class browser application as shown in the following line of code:

    DO (_BROWSER)
    

For more information, see _BROWSER System Variable.

When running the Class Browser using the DO command, you can use the following additional parameters and syntax:

DO (_BROWSER) [WITH [tcFileName][, tcDefaultClass[.member]][, tlListBox][, tcClassType][, tnWindowState]]

The following table describes the optional parameters you can use when running the Class Browser using the DO command.

Parameter

Description

tcFileName

The name of the .vcx, .scx, .olb, .tlb, .pjx, or .exe file to open in the Class Browser.

For more information, see File Extensions and File Types.

tcDefaultClass[.member]

Specifies the class to select by default in the .vcx file.

If no default class is specified, the class library is selected. If a class member is specified, the class member appears selected in the member list of the Class Browser.

tlListBox

Specifies whether to display the classes and members in list boxes rather than using tree-view controls. To display list boxes, specify True (.T.).

Default: False (.F.)

tcClassType

Specifies the initial type filter for the classes displayed in the Class Browser. To change the filter in the Class Browser, choose another value in the type list of the Class Browser.

Default: No filter.

tnWindowState

Specifies the state of the Class Browser window when opened.

0 - Normal (Default) 1 - Minimized 2 – Maximized

tlGallery

Specifies whether to open the Component Gallery instead of the Class Browser. To open the Component Gallery, specify True (.T.).

Default: False (.F.)

For example, you can run the Class Browser with a specific visual class library (.vcx) file or an object reference. You can also include the class name to be initially selected. The following line of code opens the Class Browser, the Buttons.vcx class library, and selects the VCR class:

DO (_BROWSER) WITH HOME(2) + 'Classes\Buttons.vcx', 'VCR'

As another example, you can run the Class Browser and specify to select the cmdOK object from the Print_Report class in the Samples.vcx class library, display the forms and members in Samples.vcx in list boxes, filter the classes displayed using the Form class, and open the Class Browser window as maximized:

DO (_BROWSER) WITH "Samples.vcx", "Print_Report.cmdOK", .T., "form", 2

See Also

Tasks

How to: Customize the Class Browser

How to: View Class Hierarchies

How to: Filter the Class Browser Class List

How to: View Class Definition Code

Other Resources

Operating the Class Browser

Managing Classes and Class Libraries