tags:

views:

98

answers:

4

I have a class in an external library subclassing UserControl and set to public. Now I want to use this usercontrol in my main WinForms app. I have added this external library to the references of the main app, but the user control haven't appeard in the Toolbox - I have been told it should appear.

I am doing this for the first time. So, sorry if my question is too trivial.

+2  A: 

You can right click on your toolbox and add it from the context menu...

Mladen Mihajlovic
+1  A: 

Look under Tools->Options, navigate to Windows Forms Designer->General, and make sure "AutoToolboxPopulate" is set to true.

That's for VS 2008, but it should be in a similar place on earlier versions.

Note: I believe this may only work for your own projects. If it's referencing a compiled DLL, it may not get the controls from the DLL.

Chris Doggett
+3  A: 
  1. Right click on the title panel, in the Toolbox, where you want the control.
  2. Select Choose Items...
  3. Click the Browse... button on the .NET Framework Components tab in the dialog that pops up (might take a few seconds for it to show)
  4. Navigate to the external library, select the file and click Open.

All public controls from that library are now available for selection.

Robert Höglund
+2  A: 

You can add items to the toolbox by right-clicking on it, "Choose Items...". Then go and get a coffee - it takes ages to load. Locate your dll.

Note that adding an item from the toolbox will automatically add the reference to the project.

Marc Gravell