Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subclass and Reuse
Message
De
16/11/2004 10:55:42
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows XP SP1
Database:
MS SQL Server
Divers
Thread ID:
00961677
Message ID:
00961729
Vues:
10
Bernard,

As Hector said, there is no dodefault() in .NET. And also, as Hector said, you can run base class methods, by using the statement base.MyMethod(). However, because you were talking about EventHandlers, I'll go one step further because EventHandlers are a little bit different.

This same topic was brought up just yesterday. Perhaps my reply there (see Message #961432) and in another thread several months ago (check out Thread #923810 ... there are 12 messages in that thread) might shed some light on the subject.

~~Bonnie



>Hi,
>
>I'm a long time foxpro programmer who's is pretty new to .NET.
>
>What I'm attempting to do is to create a class library of user controls for re-use throughout my application.
>
>I've managed to create the parent classes ok, and add them to my toolbox, drop it on a form and when I run it, it works fine...
>
>However, I'm having a difficult time overriding method code at a instance level.
>
>To put this in foxpro terms, say I had a classed command button that in it's click method did something really useful such as Msgbox("Parent Click")
>
>Now what we used to do in foxpro is to drop this control on a form and then override it's click method so that the parent click is called and then perform some instance code eg
>
>dodefault()
>MsgBox("child click")
>
>Is it possible to override a click event of a command button directly on the form, or do I have to store the subclassed version in a class library and then add that to the form?
>
>Thanks in advance, Bernard...
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform