Click here to Skip to main content
15,561,685 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using VS 2019.
I have a custom control dll that I created. It contains a number of customized controls. It also contains a few customized forms.
I can select the dll to add to the VS toolbox. Only the controls appear in the listing, not the forms.

Is there any way to make the custom forms available?

What I have tried:

I have searched on the internet for a solution to this and did not find anything.
Updated 6-Nov-21 21:26pm

1 solution

YOu can't add a Form to the toolbox, because it contains items that can be added by drag and drop to a Form at design time - and you can't drop a form on a form, that doesn't make any sense as it can' be "enclosed" in the form itself! Instead, a form is created and displayed at runtime - so it needs to be added via the code, not the designer.

However, you can drag and drop code fragments to the toolbox from the code window, and drag'n'drop them into other code as "boilerplate" code: just highlight the code to create and display your form, then drag'n'drop it onto the Toolbox. You can then drag it back onto your code at any time.
Share this answer
Kevin Brady 7-Nov-21 8:22am    
Thank you for the response. I thought that might be the case but also thought there might be some clever way to do what I was asking about that hadn't occurred to me.
Thank you also regarding code fragments. That could prove to be helpful for future development projects.
OriginalGriff 7-Nov-21 9:03am    
You're welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900