Home All Groups Group Topic Archive Search About

Using new control that inherits from Form

Author
16 Apr 2006 2:29 PM
Steve_Black
I have created a new control that inherits System.Windows.Forms.Form.

I just added a few new properties that I want on all my forms..nothing
fancy.

I saved this project...let's call it MyForm.

How do I actually create new instances of MyForm in my application?  I
know that if I were to create new custom controls based on other
controls, such as as textbox, I can just reference them and add them to
my toolbox.  However, because I'm trying to replace a
System.Windows.Form.Form with MyForm, it's not really applicable to
have it in the toolbox.  I created a reference to MyForm in my project,
but I'm still not certain how to actually use it.

In other words, when I right-click in Solution Explorer and go to Add,
I want to be able to select MyForm instead of Windows Form...

Any help would be greatly appreciated.

Thanks,

Steve

Author
16 Apr 2006 4:13 PM
Steve_Black
Nevermind...I figured this out.

Steve
Author
17 Apr 2006 12:23 AM
dgk
On 16 Apr 2006 09:13:03 -0700, Steve_Bl***@EagleCCI.com wrote:

>
>Nevermind...I figured this out.
>
>Steve

Oh, and I knew that one!
Author
17 Apr 2006 11:24 AM
Cerebrus
For the assistance of others, who might not know, you should post the
solution that you found.

Regards,

Cerebrus.