August 2010
Intermediate to advanced
1224 pages
34h 17m
English
Add-ins can react to commands issued within the IDE. If you recall from the discussion on commands in Chapter 13, and in Chapter 14, “Writing Macros,” this is done through the concept of “named commands.” A named command is really nothing more than an action that has a name attached to it. You already know that Visual Studio comes with its own extensive set of commands that cover a wide variety of actions in the IDE. Using the Commands/Commands2 collection, you can create your own named commands by using the AddNamedCommand2 method.
To repeat the dissection of the OnConnection method, the wizard has created a body of code responsible for creating a new named command, adding it to the Tools menu, and then reacting to the command. ...