Jump to content
  • Advertisement
Sign in to follow this  
DvDmanDT

[.net] Adding a custom control to a form

This topic is 2768 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone. This is a bit embarrassing to ask, but how on earth do you add a custom control to a System.Windows.Form? How can you get it to the toolbox? The only way I found so far is by hacking the Form.designer.cs and add it manually. Is there seriously no way to add a control in the same or a referenced project using the designer?

I can do it by compiling and then using the Choose items dialog select the projects exe/dll, but that seems extremely ugly..?

Share this post


Link to post
Share on other sites
Advertisement
That is the normal way unless the Custom Control is in the same solution as the project you are trying to use it in (which will auto-populate into the toolbox) . I usually just create a new tab in the toolbox and just add it via the Choose items dialog.

Share this post


Link to post
Share on other sites
I currently have a form with a custom control that's defined in a referenced project, maybe you should go to Tools->Options->Windows Forms Designer and then set the AutoToolBoxPopulate property to True, then rebuild your solution and it should show up in the toolbox.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!