Adding Reference to User Control

C

C# Learner

I added a custom control to my project (Project -> Add User Control) and it
won't show up under 'My User Controls' in the Toolbox.

How do I get it to show up?

(I know I could get it to show by right-clicking over the Toolbox, choosing
'Add/Remove Items...', and then browsing for my project's executable - but
if I added the "debug" executable, say, I fear I'd have to redo this every
time I build a "release" executable.)
 
S

Stoitcho Goutsev \(100\) [C# MVP]

As long as a control inherits from the UserControl class it should showup in
the toolbox.
I guess you don't add your own designer, do you?

It is possible that the toolbox may not catch up instantly, but the user
control has to show up as soon as you open a form or other control in the
designer.

Keep in mind that the user control is not available in the toolbox (dimmed
usually) if the active control in the designer is the usercontrol itself. In
other words you can't add the control to itself.
 
H

Hernando Del Toro

Hi there:

VS .NET 2003 Requieres that you show up your control first in the designer,
(by double-clicking the control file) in order for it to realize it is a
control so it appears on the "My User Controls" Toolbox.

I hope VS.NET 2005 fix this behaviour.

Nando
 

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