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

Re: Inherits TextBox and then? by hirf-spam-me-here

hirf-spam-me-here
Thu Sep 02 10:40:04 CDT 2004

* "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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Re: Inherits TextBox and then? by Imran

Imran
Thu Sep 02 10:56:14 CDT 2004

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.

"Werner Maier" <maiwern@hotmail.com> wrote in message
news:413729bc$0$146$9b622d9e@news.freenet.de...
> 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
>
>