How can I attach Ctrl + W key to a command button...
I mean when Ctrl + W key is pressed cmdWipeAll_Click event should occur...
I am sure that its something to do with keypress event in FORM...
Urgent...
Printable View
How can I attach Ctrl + W key to a command button...
I mean when Ctrl + W key is pressed cmdWipeAll_Click event should occur...
I am sure that its something to do with keypress event in FORM...
Urgent...
Actually it's KeyDOWN you want, just check this:
VB Code:
If Shift = 2 AND (Ucase(Chr(KeyCode))="W") Then 'It's pressed! End If
PS: "Urgent..." made me wait five minutes before reading your question ;)
what does that SHIFT = 2 means...???
Is it same with the CONTROL and ALT keys...???
Can some one make it clear plz...???
Cheers...
Have you ever even heard of MSDN ?
Shift = 2 means that CTRL is pressed, Shift = 1 means Shift is pressed, and 4 means ALT is pressed.
you can see help on "keydown" for more info if you need it