I want to move some graphics in a winfor application. To do this I need to know if any of the cursor keys are being pressed. I tried to override ProcessCmdKey but no success.
Any tips/ideas how to implement this?
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
switch (keyData)
{
case Keys.Left:
// while Left is down
// call this method repeadetdly
buttonGoLeft();
// when key is up stop calling this method
// and check for other keys
return true;
//Other cases
}
}
this works!