inherited control question 
Author Message
 inherited control question

I can make an inherited control for all of my user controls, but how do I
inherit from the built-in ones? I can't seem to find any correlated .dll's.
In particular, I want to inherit from the TextBox. I need to do it with the
'Inhertied Control' approach and not just use 'Inherits TextBox' because I
want to be able to use the new control in the form designer.

TIA,
Bob



Tue, 28 Jun 2005 06:21:25 GMT  
 inherited control question
Bob,

You can inherit from the base controls and have them appear in the tools box
like a user control.

once you got your base class started.  simply type above your current
inherits statement Inherits SystemWindows.Forms.Usercontrol.  If you don't
already have to component window open double click your class file in the
explorer and you will see a Usercontrol designer.  An icon will now be in
the toolbox.

Go back into your code and remove the inherits statement you just added.
And you'll stop seeing the blue squiggly line.

Cheers

Randy


Quote:

> I can make an inherited control for all of my user controls, but how do I
> inherit from the built-in ones? I can't seem to find any correlated
.dll's.
> In particular, I want to inherit from the TextBox. I need to do it with
the
> 'Inhertied Control' approach and not just use 'Inherits TextBox' because I
> want to be able to use the new control in the form designer.

> TIA,
> Bob



Wed, 29 Jun 2005 03:32:57 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Controls Inheriting Other Control's Properties

2. Controls Inheriting Other Control's Properties

3. Controls Inheriting Other Control's Properties

4. Controls Inheriting Other Control's Properties

5. Extremely Simple Inherit Question

6. Inherited Form Question

7. total newbie question about inherit

8. dumb question regarding inheriting a button??

9. Making objects around a dataset (XSD), inheriting questions

10. custom form control: Cannot view design view of forms that inherit this form

11. Tab Control in inherited forms

12. Inheriting from controls

 

 
Powered by phpBB® Forum Software