Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

User Controls not showing up in the toolbox

I have some UserControls that I created in ProjectA. I have ProjectB that has a windows form that I want to put the controls on. Both of these projects are in a single solution. There's a reference to ProjectA from ProjectB so it can "see" the UserControls.

However, the UserControls do not show up in the toolbox for me to drag to the windows form.

I've tried rebuilding. I've also deleted the 'bin' directory to force a rebuild-all.

How do I get VS2008 to populate the toolbox with my UserControls?

like image 272
Robert Avatar asked Nov 13 '08 19:11

Robert


People also ask

How do I add controls to my Visual Studio Toolbox?

The Toolbox window displays controls that you can add to Visual Studio projects. To open Toolbox, choose View > Toolbox from the menu bar, or press Ctrl+Alt+X. You can drag and drop different controls onto the surface of the designer you are using, and resize and position the controls.

How do I reset my Visual Studio Toolbox?

Reset the Toolbox from Visual Studio: right-click the Toolbox and click “Reset Toolbox”.


2 Answers

Check this setting:

Tools > Options > Windows Forms Designer > General : AutoToolboxPopulate

It should be set to True for this to work.

like image 108
Ryan Lundy Avatar answered Oct 09 '22 05:10

Ryan Lundy


  1. Build your project to make sure it compiles.

  2. With the form that you want your user control on, open the toolbox, right click and select "choose items"

  3. Browse to your .exe or dll that you compiled in step 1.

  4. make sure that your user control has a tick next to it, press OK.

  5. Your user control should appear in the toolbox, so drag it onto your form.

This is adapted from Calanus's answer to a similar question.

like image 33
Don Kirkby Avatar answered Oct 09 '22 05:10

Don Kirkby