SvenC said:
Hi T,
As far as I know managed classes inherit public by default in contrast to
native C++. So did you explicitly inherit private from Panel?
Alternatively you could try to explicitly inherit with "public Panel"
..NET doesn't allow private inheritance.
Otherwise this could indicate a compiler bug.
No, it's the same in C# and VC++ 2005. Only the class which declares an
event can fire it. The public access refers to the ability to subscribe
handlers, not to trigger the event. Usually calling the base class has an
OnKeyDown method which you can call, resulting in the event being fired with
your parameters.
Or, you can hide the parent event as you've done, but anyone who subscribes
with a base class pointer won't see your event.