Share via


Viewing and Altering the Browsing Scope

The Object Browser allows you to view objects and their members within a given browsing scope. There are two different browsing scopes to choose from: Active Project and Selected Components.

Choosing the Active Project browsing scope allows you to view the contents of the active project in your solution and its references. As the active project changes, the Object Browser updates, which is similar to the behavior of the Object Browser in previous versions of Visual Basic.

In the Selected Components browsing scope, you can choose the specific components you want to browse. These can include projects in your solution and their references, and any other external components, such as .NET Framework components, COM components, and source browser (.bsc) files. To add and remove these components, use the Selected Components dialog box by clicking Customize in the Object Browser. This functionality is not available while you are in the Active Project browsing scope.

Settings made to the Selected Components **** browsing scope are retained between sessions of Visual Studio. The list of External components that you have chosen is saved in the Visual Studio .NET user application directory c:\Documents and Settings\<USERNAME>\Application Data\Microsoft\VisualStudio\7.1\ObjBrow.dat. Deleting this file clears this list.

To view and hide components in the Selected Components browsing scope

  1. Choose Selected Components in the Choose Object Browsing Scope list.
  2. Click Customize to display the Selected Components dialog box.
  3. To view a component, select its check box. To hide the component from view, clear its check box.
  4. Click OK to apply the changes and return to the Object Browser.

You can also add other components to the browsing scope.

To add external components to the Selected Components browsing scope

  1. Choose Selected Components in the Choose Object Browsing Scope list.
  2. Click Customize to display the Selected Components dialog box.
  3. Click Add to display the Component Selector dialog box.
  4. Click the tab of the type of component you wish to add.
  5. Add a component to the Selected Components list at the bottom of the dialog box by either double-clicking the name of the component or clicking Select .
  6. If you cannot find the component listed in the tab, click Browse to add the file of the component. This is how, for example, to add source browser (.bsc) files.
  7. Repeat steps 4 – 6 until you have selected all the components you want. Use the Remove button to remove components from the list.
  8. Click OK to add the selected components to the Selected Components dialog box. If any of the selected components cannot be browsed, an error message displays listing the components that could not be added. Click OK to add the valid browse components and ignore the rest. If no components are successfully added, you are returned to the Component Selector dialog box.
  9. Click OK in the Selected Components dialog box to return to the Object Browser and view the selected components.

You can also remove external components from the browsing scope.

To remove external components from the Selected Components browsing scope

You can right-click the component node in the Object Browser and select Remove. Alternatively, you can do the following:

  1. Choose Selected Components in the Choose Object Browsing Scope list.

  2. Click Customize to display the Selected Components dialog box.

  3. Select the component you want to remove and click Remove.

    Note   This does not delete the component; it only removes it from the browsing scope. You can remove only external components, not projects in your solution. To hide projects in your solution from the Selected Components browsing scope, clear the check boxes next to them.

See Also

Object Browser Elements | Navigating in the Object Browser | Using .bsc Files to Browse to References of C++ Symbols | Searching for Symbols: Objects, Definitions and References