Automation Support for Options Pages

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

VSPackages can provide custom Options dialog boxes to the Tools menu (Tools Options pages) in Visual Studio and can make them available to the automation model.

Tools Options Pages

To create a Tools Options page, a VSPackage must provide a user control implementation returned to the environment through the VSPackage's implementation of the GetPropertyPage method, (or for managed-code the GetPropertyPage method).

It is optional, but strongly encouraged, to allow access to this new page through the automation model. You can do this through the following steps:

  1. Extend the Properties[] object through the implementation of an IDispatch-derived object.

  2. Return an implementation of the GetAutomationObject method (or for managed code the GetAutomationObject method) to the IDispatch-derived object.

  3. When an automation consumer calls the Properties[] method on a custom Option property page, the environment uses the GetAutomationObject method to obtain a custom Tools Options page's automation implementation.

  4. The automation object of the VSPackage is then used to provide each Property returned by Properties[].

    For a sample implementing a custom Tools Options page, see VSSDK Samples.

See Also

Exposing Project Objects