Windows Develop Bookmark and Share   
 index > Windows Forms Designer > User control doesnt appear in the win app
 

User control doesnt appear in the win app

Hi ,

I ve created a sample windows control library application in VS2005 c#.net .I built it and ran , it worked fine . I also added a new project in the same solution , then this user control comes to the tool box and i could able to use it .

But , If i create a new solution , i went to select my user control by 'Add Reference dialog box' . It didnt appear in the projects tab . I moved to the Browse tab and seleceted my component(with extn .dll) . Though the dll was added in the reference list , the user control was not added in the tool box list .

I also didnt find any tab called 'My user control' in the toolbx .

Please help why is it not coming when referenced from a new solution . I use VS2005 ,professional edition .

Thanks

Devasena

Raghuraman_ace  Wednesday, February 27, 2008 7:11 PM

HiRaghuraman_ace,

The Visual Studio Command Prompt allows you to add custom controls to the toolbox. Try something like the following:

Code Snippet

But before you execute that command, you should add a folder under C:\Documents and Settings\ [username]\My Documents\Visual Studio 2005\Controls\, and the new added folder’s name is used as the toolbox tab’s name. If there is no ‘Controls�folder, you can add it manually. And then put the DLL file which contains the control in the new added folder.

More information, please visit:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2153798&SiteID=1

Hope this helps.
Best regards.
Rong-Chun Zhang

Rong-Chun Zhang  Monday, March 03, 2008 10:33 AM

Adding reference to the Control DLL woudn't add the control to the TOOLBOX.

  1. To add you can simply right click on the TOOLBOX and Select "Choose Items...".
  2. Browse your Control DLL and load it.
  3. You controls in the DLL would be loaded onto the TOOLBOX.
MeetJayBlack  Monday, March 03, 2008 11:22 PM

Hi Rag,

Yes, if you havea new control(is it COM visible?? and if so was it registered?). Note: that if you have two projects, one using the other as a "project reference" that is fine and will work, but you should use the DLL reference (as you tried) in other projects.

However, when you browsed you said you found the dll and added it.

Are you sure it was added?

Do you see it in the Referenced dll list of your project?

If not, make sure to add it then you should see it.

Also are you on Sp1 or non-Sp1 VS05?

Anokneemous  Sunday, March 02, 2008 3:26 AM

HiRaghuraman_ace,

The Visual Studio Command Prompt allows you to add custom controls to the toolbox. Try something like the following:

Code Snippet

But before you execute that command, you should add a folder under C:\Documents and Settings\ [username]\My Documents\Visual Studio 2005\Controls\, and the new added folder’s name is used as the toolbox tab’s name. If there is no ‘Controls�folder, you can add it manually. And then put the DLL file which contains the control in the new added folder.

More information, please visit:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2153798&SiteID=1

Hope this helps.
Best regards.
Rong-Chun Zhang

Rong-Chun Zhang  Monday, March 03, 2008 10:33 AM

Adding reference to the Control DLL woudn't add the control to the TOOLBOX.

  1. To add you can simply right click on the TOOLBOX and Select "Choose Items...".
  2. Browse your Control DLL and load it.
  3. You controls in the DLL would be loaded onto the TOOLBOX.
MeetJayBlack  Monday, March 03, 2008 11:22 PM

Hi Jay,

As a newbie to 2005 , this simple steps solved my question .

How ever , the previous solutions are very informative ,.and helps me how can i add controls to the tools box via command prompt .

Thanks friends

Devasena

Raghuraman_ace  Tuesday, March 04, 2008 5:34 AM

You can use google to search for other answers

Custom Search

More Threads

• date validation
• Brief introduction to designer architecture and how to handle drag&drop events [semi-solved]
• In Visual Basic .Net 2003 - capturing key press events in a ListBox.
• Custom User Control
• Edit static properties of a custom UserControl in designer?!..
• Look and feel
• ListView columns property is readonly and disabled in Form designer
• Read the data from Datagrid view
• can't add inherited user control to my project
• TabControl - problem