Add UserContol to Toolbox without creating Windows Control Library

  • Thread starter Thread starter Evan Stone
  • Start date Start date
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
 
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
 
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
 
Back
Top