About KeyEventArgs

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

the KeyEventArgs.KeyCode is readonly, so I want to override it.
How to do it?

I create a class,
public class ExteKeyEventArgs : KeyEventArgs
{
ExteKeyEventArgs(Keys keys)
}
but it has a error, the error said, the method KeyEventArgs has not over
ride(error CS1501).
What's wrong?

Thank you.
 
Hi,

"KeyEventArgs" class look pretty inheritable for me.

Try this:

using System.Windows.Forms;

public class ExteKeyEventArgs
: KeyEventArgs
{
public ExteKeyEventArgs(Keys keys)
: base(keys)
{
}
}

HTH
Marcin
 
Back
Top