EnvDTE80.Windows2 toolWins;
EnvDTE.Window toolWin;
toolWins = (Windows2)_applicationObject.Windows;
// Create the new tool window, adding your user control.
toolWin = toolWins.CreateToolWindow2(_addInInstance,
asmPath, ctlProgID, "MyNewToolwindow", guidStr,
ref objTemp);
// The tool window must be visible before you do anything
// with it, or you will get an error.
if (toolWins == null)
{
toolWin.Visible = true;
}
// Uncomment the code below to set the new tool window's
// height and width, and to close it.
// System.Windows.Forms.MessageBox.Show("Setting the height
// to 500 and width to 400...");
// toolWin.Height = 500;
// toolWin.Width = 400;
// System.Windows.Forms.MessageBox.Show
// ("Closing the tool window...");
// toolWin.Close(vsSaveChanges.vsSaveChangesNo);