Keys.Shift is a "modifier key" and Keys.ShiftKey is a "key".
You use Keys.ShiftKey when you want to check only if the shift key is pressed.
You use Keys.Shift when you are checking for another key combined with the shift and, maybe, other modifier keys.
Also, you should always use bitwise operations, as Herfried noted, combined conveniently, depending if you can or cannot ignore other modifier keys.
Regards.
"Boni" <oilia@nospam> escribió en el mensaje | Thank you Jose', Herfried.
| BTW, what is the difference between keys.shift and keys.shiftkey
| | > "José Manuel Agüero" <chema012 en hotmail.com> schrieb:
| >>You may be looking for this:
| >>
| >>If Control.ModifierKeys = Keys.Shift Then...
| >
| > ... or, if you want to get the state of the key even if other modifier
| > keys are pressed:
| >
| > \\\
| > If CBool(Control.ModifierKeys And Keys.Shift) Then
| > ...
| > End If
| > ///
| >
| > --
| > M S Herfried K. Wagner
| > M V P <URL:
http://dotnet.mvps.org/>
| > V B <URL:
http://classicvb.org/petition/>
|
|