Hi,
I have inherit a class from TextBox. In my class I do some stuff. But how
can I get my class to a form? Placing a normal TextBox and changing TextBox
to MyTextBox will not work. The box disappears from the form.
What must I do?
Thanks
Werner
Herfried K. Wagner [MVP] - 02 Sep 2004 16:40 GMT
* "Werner Maier" <maiwern@hotmail.com> scripsit:
> I have inherit a class from TextBox. In my class I do some stuff. But how
> can I get my class to a form? Placing a normal TextBox and changing TextBox
> to MyTextBox will not work. The box disappears from the form.
> What must I do?
Create a new usercontrol and then replace its implementation with the
implementation of your textbox. Then try to drag your control from the
toolbox onto a form.

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/
Imran Koradia - 02 Sep 2004 16:56 GMT
Just build the project containing your inherited control. If you don't have
the project along with your main app project, you can reference it from the
References section.Otherwise, you should see your control in the toolbox
under 'My Controls' or something like that. You can then use it just like
any other WinForm Controls.
Imran.
> Hi,
>
[quoted text clipped - 5 lines]
> Thanks
> Werner