2

How do I add a user control to a Windows Forms application in Visual Studio 2010?

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
jay
  • 121
  • 2
  • 4
  • 11
  • 1
    is usercontrol can be visible in toolbox after compilation like in visual studio 2008,becouse i can create,but can't find the control after build in 2010. would you suggest any method to find it – jay Dec 31 '10 at 10:35

3 Answers3

7

You can try advice from How to put a UserControl into Visual Studio toolBox. However, I had no success, but finally I found soulution.

My steps:

  1. New Winforms Project (creates projects with Form1 included)
  2. New User control (rebuild)
  3. Go to Solution Explorer and click 'Show All Files' on the toolbar.
  4. Expand Form1 and open Form1.Designer.vb (.cs)
  5. User Control is now in toolbox.

I have no explanation.

Community
  • 1
  • 1
IvanH
  • 5,039
  • 14
  • 60
  • 81
  • This is the only answer to attempt to answer the question correctly, however this still didn't work for me. – Ryan Leach May 23 '14 at 10:44
0

Right click on the project in solution explorer, select the add new user control menuitem.

fejesjoco
  • 11,763
  • 3
  • 35
  • 65
0

Got to:

Project at the topmenubar

then

pick the 2nd option: "add user control..."

type in a name for the user control u want and your done by clickin on OK

ProblemAnswerQue
  • 535
  • 1
  • 3
  • 18