Add UserContol to Toolbox without creating Windows Control Library

E

Evan Stone

Hello All,

I've got two C# UserControls in a standard Windows Application project,
but I'd like to be able to add them to my Toolbox so I can start placing
them on forms.

Unfortunately, it's not really clear how to do this, since all the
examples I've found in the documentation seem to show creating a Windows
Control Library, building the DLL, then adding it to a test application
project.

However, I'd really rather just contain the controls in the application
and not expose them as DLLs (and have to maintain them as a separate
project) if I can avoid it.

I expected them to automatically appear in my UserControls section of my
Toolbox (a la VB6), but I guess that was an erroneous assumption on my
part...

Any help will be greatly appreciated.

Thanks!

-Evan
 
E

Evan Stone

Seems like we may be looking at a bug here, folks.

Turns out that if I create a UserControl, it does add it to the Toolbox.
However, if I change the name of the control's file name (which is
exactly what happened earlier), the Toolbox loses its mind and the user
control vanishes. :p

So aaaaanyway.... now that I've lost two hours on this, I know what's
going on, and will avoid disturbing the house of cards from here on out.

///eks
 
E

Evan Stone

Seems like we may be looking at a bug here, folks.

Turns out that if I create a UserControl, it does add it to the Toolbox.
However, if I change the name of the control's file name (which is
exactly what happened earlier), the Toolbox loses its mind and the user
control vanishes. :p

So aaaaanyway.... now that I've lost two hours on this, I know what's
going on, and will avoid disturbing the house of cards from here on out.

///eks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top