Responding to IDE Events

The DTE has exposed several categories of events for which you can write event handlers, enabling you to write code that fires when something in the VS .NET IDE occurs rather than requiring the user to explicitly start a macro.

Categories of events include DTEEvents, DocumentEvents, WindowEvents, TaskListEvents, FindEvents, OutputWindowEvents, SelectionEvents, BuildEvents, SolutionEvents, SolutionItemEvents, MiscFilesEvents, and DebuggerEvents. For example, DTEEvents has an OnStartupComplete event that fires when a macro project is loaded. WindowEvents passes a reference to a closing EnvDTE.Window object when you close a window in the VS .NET IDE. BuildEvents will notify your macro code when a build has begun and finished. ...

Get Visual Basic® .NET Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.