I am using Visual Studio 2008, with .NET Framework v3.5.

Consider this scenario:
You created a new Class Library project called "SomeDLL",
and in it you created 1 class, called "SpecialButton",
which inherits System.Windows.Forms.Button.

If you do that, and build your project, and then add some Form in that project,
then when going to the Form's Designer,
you will see in VisualStudio's Toolbox the Inherited button that you've just created:

It was added to the Toolbox automatically, by VisualStudio,
without you needing to RightClick the Toolbox, choose "Choose Items...",
and then go over the long list or browse for a DLL and add it.

Visual Studio even created a new Tab for it, with the name of the DLL.

So far quite comfortable.

Now consider this scenario:
You create another project, this time a Windows Application, called "SomeEXE".
You Add Reference to the previously created and compiled DLL (named "SomeDLL").

Now If you go to the Form in the SomeEXE project, and open the Toolbox,
despite the fact that you added the DLL that contains a Control, it seems that it does not automatically appear in the Toolbox..
(at least that's what happens in my case)

Is there anything that can be done, so after Adding a Reference to a DLL that contains a Control, then the Control will automatically appear in the toolbox in referencing projects?

Without the developer needing to RightClick the Toolbox,
then "Choose Items...",
then Browse for the DLL (which have just been added to the project, via Add Reference),
etc.

The reason I am asking about it, is not just because of the little work that is required every time after you create a control in a DLL,
but also because if you manually add a control to the toolbox in some project,
then it will not just added to the toolbox of that project, it will be added from now on to Visual Studio in general,
and you will see it even in other projects that don't need it, and don't even Reference that DLL..

With the automatic way, this problem does not occur..

0

There are 0 answers