On Fri, 28 Dec 2007 06:20:44 -0800, JTC^..^ <da**@jazzthecat.co.ukwrote:
When I create a custom control inside my Windows Application project
it does not appear in the toolbox. I'm using Visual Studio 2005 (Team
System for Developers), so this should appear automatically, right?
Yes. Assuming the control is properly referenced, either by being an
imported library or by being part of a project within the solution itself,
it should show up in the Toolbox.
I don't know off-hand what the problem might be. I suspect there's some
sort of error in the implementation of the control. One way to test that
would be to build the exact control as a library, and import it into a
completely different solution's project and see if it shows up there. I
would guess that it won't.
If it doesn't, then you need to figure out what's wrong with the control
implementation. You may want to post a _concise_ but complete sample of
code that reproduces the problem, since otherwise it's not really possible
for anyone to comment specifically on what's wrong.
If the control does show up when imported into a different solution, then
I really don't know. It seems likely that that means there's something
about the solution in which it's contained that is somehow suppressing it,
but what that could be I have no idea.
Another test you might do is to create a brand new empty solution, and add
a new Custom Control class to the solution, to see if it shows up in the
toolbox. That way you know for sure there's nothing that you might have
added to the class that would cause a problem. If it doesn't show up in
that scenario, there's definitely something odd going on with VS. If it
does show up in that scenario, that's further support for the theory that
you've got something particularly wrong in the custom control that's not
showing up, probably related to code you added yourself.
Finally, I suppose it's possible that there's some user setting that
inhibits controls from showing up in the Toolbox, but what that might be I
don't know, and it seems odd that it would apply only to a control from
within the same solution.
Pete