Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / May 2006

Tip: Looking for answers? Try searching our database.

Addin: how to call existing vs.net IDE command?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rob - 22 May 2006 19:59 GMT
I wanted to create an addin button that can close all documents just
like when you click "Window | Close All Documents" from vs.net 2005 ide
menu but couldn't figure out how to do this.  I'm able to create the
button and find out the command name (Window.CloseAllDocuments),
GUID{5EFC7975-14BC-11CF-9B2B-00AA00573819} and ID(627) etc. using
Microsoft's CmdBrowserVB sample project.  There must be an easy way to
do this.

Thanks for help.
Peter Macej - 23 May 2006 08:08 GMT
You can invoke any VS command using DTE.ExecuteCommand method. In your
case you can use DTE.ExecuteCommand("Window.CloseAllDocuments").

Signature

Peter Macej
Helixoft - http://www.vbdocman.com
VBdocman - Automatic generator of technical documentation for VB, VB
.NET and ASP .NET code

Rob - 23 May 2006 13:00 GMT
Very nice tip.  My project uses C# addin template so the code is
"_applicationObject.ExecuteCommand("Window.CloseAllDocuments","");

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.