How to design classes inherited from Form

  • Thread starter Thread starter Iulian Ionescu
  • Start date Start date
I

Iulian Ionescu

This is a simple question but I cannot find a simple
answer: I had to inherit a class from Form and give it
some various properties. I want let the user be able to
use this with the designer like if they were using a
Form. However, I cannot find a way the user can actually
drop the new form on a root designer surface... Is it
possible or it all has to be done manually through code?

thank you!
 
You should add the Designer attribute to your class. Use the
ComponentDesigner base class and then the form will show up in the
componenet tray and you'll have access to it's methods in the design time in
the same way that you do with the ColorDialog etc.

If you wish to add design time capabilities such as property filtering or
shadowing, derive from ComponentDesigner.

--
Bob Powell [MVP]
C#, System.Drawing

September's edition of Well Formed is now available.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm
 
Back
Top