Hi Charles,
It can be six of one or half a dozen of the other in most cases. That is, if
you are not expecting your form to be derived from, then using the event is
simpler as it means you don't have to ensure the call to the base method gets
called.
Overriding the OnXXXX does require you to write more code, even if it is simply
calling the base class OnXXX. But it also gives you that extra flexibility in
knowing exactly when your code gets called either side of rasing the event. If
you think your form may be derived from, this can be crucial. The reason being
that although most probably, your form's XXX event subscribing code would get
called before any subscribing code in a further derived class, there is no
guarantee it will. So if you need to initialize object or fields before a
derived class accesses them, then the OnXXX override will give you that ability
with certainty, whereas events won't.
So as you can probably see, the OnXXX pattern is more powerful, and is probably
preferable, but that doesn't mean that the event subscription is necessarily a
bad thing, as long as you are aware of the limitations and requirements of both
Bill.