469,626 Members | 1,065 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

About KeyEventArgs

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.
Nov 16 '05 #1
1 2543
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
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.

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Dino Buljubasic | last post: by
2 posts views Thread by Martijn Mulder | last post: by
1 post views Thread by Claudia Fong | last post: by
4 posts views Thread by Anthony P. | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.