Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing base classes
Message
From
17/07/2004 21:46:21
 
 
To
17/07/2004 21:06:59
Keith Payne
Technical Marketing Solutions
Florida, United States
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00925304
Message ID:
00925524
Views:
17
Keith,

I think you may have mis-understood Del's question. If he sub-classes Form2 from Form1, none of Form1's controls will show up in Form2's code.

So Del, the answer is no, you cannot do it.

~~Bonnie

>>If I sub-class a form containing controls, is there any way to override the class that a specific control on the form inherits from? In other words, can I force the control to inherit from a different class than it inherits from on the parent/base form. I assume not and can see the reasoning, but wondering anyway.
>>
>>Thanks!
>>
>>Del
>
>Del,
>
>The controls don't inherit from the form. They are instances of built-in .NET classes that are independent of the form. To see the control declarations, expand the collapsed region near the top of the code. I forget exactly what .NET calls the region.
>
>In the code, you should see each control declaration. You can change the inheritance by modifying the line. .NET will not overwrite your changes once they are made.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform