Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / September 2004

Tip: Looking for answers? Try searching our database.

Inherits TextBox and then?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Werner Maier - 02 Sep 2004 15:10 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.