Controlling Tools Options Settings
Using the Properties and Value properties and Item method of the DTE object in the Visual Studio .NET automation model, you can activate or deactivate the settings of the various Options dialog boxes on the Tools menu.
Tools Options Settings Example
The following VSA example demonstrates how to manipulate the settings of an Options dialog box on the Tools menu. In this case, it affects the Line Numbers option for the Text Editor section of the Options dialog box.
Sub TurnOnLineNumbers()
DTE.Properties("TextEditor", "Basic").Item("ShowLineNumbers").Value = True
DTE.Properties("TextEditor", "PlainText").Item("ShowLineNumbers").Value = True
DTE.Properties("TextEditor", "CSharp").Item("ShowLineNumbers").Value = True
DTE.Properties("TextEditor", "HTML/XML").Item("ShowLineNumbers").Value = True
DTE.Properties("TextEditor", "C/C++").Item("ShowLineNumbers").Value = True
End Sub
See Also
Creating Custom Tools/Options Pages | Changing Window Characteristics | Creating and Controlling Environment Windows | Creating Add-Ins and Wizards | Creating an Add-In | Creating a Wizard | Automation and Extensibility Reference | Automation Object Model Chart