Can't overrode ProcessCmdKey in clontrol

T

Teis Draiby

I want to catch key shortcuts in a control by using ProcessCmdKey (using
C#), but i get a compiler error: "no suitable method found to override".
What am I doing wrong.
Is it because I'm using .NET Framework 1.0??

Any answer is very much appreciated,
regards Teis
 
H

Herfried K. Wagner [MVP]

Teis Draiby said:
I want to catch key shortcuts in a control by using ProcessCmdKey (using
C#), but i get a compiler error: "no suitable method found to override".
What am I doing wrong.

Are you sure you used the right parameters? Post your code!
 
T

Teis Draiby

It goes like this:

protected override bool ProcessCmdKey(Message msg, Keys keyData)
{
MessageBox.Show(keyData.ToString());
return true;
}


regards, Teis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top