Hi there,
I'm trying to handle some shortcut keys within my application and I
can't seem to get the code to work when you are trying to action
against a ctrl + other character.
I found a post
http://groups.google.co.uk/group/mic...cbc8062c107680
that appears to help a lot but it doesn't seem to work with the ctrl
key.
here's the snippet of code I am working with, which was modified from
the thread mentioned above:
protected override bool ProcessDialogKey(Keys keyData)
{
if (keyData == Keys.ControlKey && keyData == Keys.G)
{
ReassignAssessment();
}
else if (keyData == Keys.Insert)
{
ToggleReadUnread();
}
return base.ProcessDialogKey(keyData);
}
This method seems to be fired on every key press, so I don't even get
a chance to press "G" as the method has already fired on ctrl. Even
when I run without debugging it's showing no signs of executing.
The value of keydata when I do debug is 131089, which if I look at the
MSDN help could match to the value of Keys.Control (131072) +
Keys.ControlKey (17)
Are there any alternatives that I could try to get this to work?
Thanks,
Emma Middlebrook