Drag and Dropping subclassed controls

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a custom control called PageBanner which is compiled into a DLL and
then put into the toolbox. It shows like I would expect it to in the
toolbox, and I can drag and drop it onto a form. However, instead of getting
the control on the form, I get nothing. No error message, no control. Yet
there are other times where it does drop on the form as expected.

I have tried recompiling the dll with the control and readding it to the
toolbox, and still, nothing. It'w become quite frustrating. I suspect that
there is something wrong with the code of the control which prevents it from
appearing properly, but I don't know what the problem is. There are no
compile error, nor errors at runtime on the forms that I do get it to drop
onto.

This same issue is now happening with other controls in the same classlib.
These controls are simple subclasses of the basic controls. Again, what
happens is that when I attempt to drag and drop them onto a form, the
controls doesn't drop onto the form. This makes these subclasses unusable
except in written code.

Any advice would be appreciated.

Greg
 
OK, so here is how I solved problems with the toolbox and subclassed
controls: Put them in there own solution/project. Then add the resulting dll
to the toolbox. No problems after that.

This took quite some time to isolate.

Greg
 
Back
Top