380Microsoft Visual Studio 2010: A Beginner’s Guide
take an even closer look at the comments in the code for a better understanding of what that code does. The code comments are exactly the same in VB. Some of the comments refer to the host application, where the host is either the VS IDE or the VS Macro Editor, as was selected while running the
Listing 13-1 Skeleton code for the Connect class
using System;
using Extensibility; using EnvDTE; using EnvDTE80;
using Microsoft.VisualStudio.CommandBars; using System.Resources;
using System.Reflection; using System.Globalization;
namespace KeystrokeFinder
{
///<summary>The object for implementing an
///<seealso class='IDTExtensibility2' />
public class Connect : IDTExtensibility2, IDTCommandTarget
{
///<summary>
///Implements the constructor for the
///Place your initialization code within this method.
///</summary>
public Connect()
{
}
///<summary>
///Implements the OnConnection method of the
///IDTExtensibility2 interface. Receives notification
///that the
///</summary>
///<param term='application'>
///Root object of the host application.
///</param>
///<param term='connectMode'>
///Describes how the
///</param>