Re: Want add / remove Components in ToolBox

From: Jose Marcenaro (josem_at_nospam.da-vinci.com.ar)
Date: 03/09/04


Date: Tue, 9 Mar 2004 09:29:34 -0300

Hmmm. I don't think doing so will work, because toolbars do NOT take its
controls from the GAC.
(nor does the VS.NET IDE takes its References from there, by the way)
GAC is used mostly at runtime, and has almost no influence on the IDE

As for the Add-in, doing a basic one is quite simple:

1) add a new project of type "VS.NET Add-in" (found in Other projects -
Extensibility Projects), this launches a wizard.

2) on the Options page, select both "Yes, create a 'Tools' menu item...."
and "My Addin should be available to all users...."

3) the wizard adds two projects to the solution: the addin itself, and the
addin setup project.

On the Exec method of the Connect.cs class (assuming you choose C#, it's
similar for VB)
place this code within the if(commandName == "MyAddin1.Connect.MyAddin1")
block:

   Window win =
applicationObject.Windows.Item(EnvDTE.Constants.vsWindowKindToolbox);
   ToolBox objToolbox = (ToolBox)win.Object;
   ToolBoxTabs colTbxTabs = objToolbox.ToolBoxTabs;

   //Now you can manipulate the ToolBox!
   System.Windows.Forms.MessageBox.Show("Number of ToolBox tabs: " +
colTbxTabs.Count.ToString());

NOTE: for MessageBox to work you need to add a reference to
System.Windows.Forms

4) For a try, you may leave only this code by now (later you may use the
toolbox object model to add / replace your controls on a toolbox tab of your
own, or on an existing one)

5) After building this project you must manually build the setup project (by
default its disabled in the solution configuration), then close all VS
instances and run the .msi file from the bin/debug folder of the setup
project. When you reopen the IDE and select the Tools menú... Voilà!

Regards
Jose.

"Thibaud Bouquely" <TBouquely@NOSPAM.fr> escribió en el mensaje
news:OJ4prScBEHA.1028@TK2MSFTNGP11.phx.gbl...
> Thanks a lot for your help, I will try to find some Time to read theses
> references ! (We wanted create addin for others problems, it would be very
> useful ...)
>
> I just think about another way >> mays be it'is possible to use the GAC
> system
> >> Find a good way yo refresh GAC automaticaly (Cut/copy could enought
...)
> >> each "guy" of team add theses assembly in Tool list
>
> after each release of theses assemblies >> close Visual Studio, Refresh
the
> GAC, Open Visuel Studio >> may be this way can work fine
>
> What do you think about this ?
>
> "Jose Marcenaro" <josem@nospam.da-vinci.com.ar> a écrit dans le message de
> news: #oF$btRBEHA.1128@TK2MSFTNGP11.phx.gbl...
> > Hello Thibaud
> >
> > I guess the "politically correct" way of doing that is using Visual
Studio
> > Extensibility model, and developing a small Add-in for that purpose,
which
> > you could add as an item in the Tools menu.
> >
>
http://msdn.microsoft.com/library/en-us/vsintro7/html/vxconCreatingAutomatio
> nObjects.asp
> >
> > The toolbox object model is described here:
> >
> >
>
http://msdn.microsoft.com/library/en-us/vsintro7/html/vxconcontrollingtoolbo
> x.asp
> >
> > Regards
> > Jose.
> >
> > "Thibaud Bouquely" <TBouquely@NOSPAM.fr> escribió en el mensaje
> > news:eTkmH2GBEHA.2440@TK2MSFTNGP12.phx.gbl...
> > > Hello,
> > > I try to Add/Remove components in ToolBox for a Team Developpement
with
> > > automatic process (.BAT, .REG or a small application if necessary)
> > >
> > > In fact, I don't want each developper goto Menu item Tools/Add/Remove
> > items
> > > in toolBox and choice each DLL !! (it is not complex but it's better
for
> > > Team if this process is automatic) !!
> > > I try to use FileMon.exe and RegMon.exe to known how VS.NET save
theses
> > > parameters but I didn't see anything can help me. It seems all work is
> > done
> > > when VS.NET is closed >> FileMon and RegMon show too lot of things at
> this
> > > moment !!
> > >
> > > May be someone try to do the same things ? (It would be very useful
for
> > lot
> > > of developpement Team, I think !)
> > >
> > > Thanks for your help !
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: Toolbox items are gone, reset is no help
    ... I opened the toolbox and they ... So I went back into VS IDE to try some new attack, ... I then went back to hit Reset one more time, ... hung before, and this time I let it stay that way for several minutes. ...
    (microsoft.public.vsnet.ide)
  • Re: Renaming Windows Forms and Files
    ... That is how to change the name of the Form class in the IDE, ... other references to the Form to use the name you change it to. ... rename the Form in your code. ... "Kevin Spencer" wrote: ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: StackTrace and StackFrame
    ... I am not running from the IDE. ... assembly in the GAC. ... So should the pdb file also lie in ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Getting the CXML library up and running
    ... include directory of CXML to the project, ... I'm not particularly surprised--the source file specifically references ... Consequently the IDE would have to process the ...
    (comp.lang.fortran)
  • Re: How can I list references in a VB6 project
    ... The references collection is part of the IDE, ... Unlike VB they can always access the reference collection of there IDE. ... you can access VB's reference collection via an addin. ...
    (comp.lang.basic.visual.misc)