How
-
I found out that the items under the menu strip can have a short cut key.. now i want a short cut key for my tool bars or some other components.. so what i did was to enable the key preview of the form then on the key down event, i tried to capture the keys.. but the problem is it only accepts one key at a time.. what if i press two keys like control + s or control + 0... how do i capture those combination?
-
I found out that the items under the menu strip can have a short cut key.. now i want a short cut key for my tool bars or some other components.. so what i did was to enable the key preview of the form then on the key down event, i tried to capture the keys.. but the problem is it only accepts one key at a time.. what if i press two keys like control + s or control + 0... how do i capture those combination?
When you check what key has been pressed, you can also check if any special keys are also pressed (like Ctrl, Shift) So to check for Ctrl+F:
void myEvent(object sender, EventArgs e)
{
if(e.Key == F && e.Ctrl)
{}
}Or err, something like that anyway.
My current favourite word is: Nipple!
-SK Genius