How to detect more than 1 moddifier keys? ( Alt
& Ctrl
)?
I have this working code:
Private Sub PictureBox1_MouseWheel(sender As Object, e As MouseEventArgs) Handles PictureBox1.MouseWheel
If ModifierKeys = Keys.Control Then
If e.Delta <> 0 Then
PictureBox1.Width += CInt(PictureBox1.Width * e.Delta / 1000)
PictureBox1.Height += CInt(PictureBox1.Height * e.Delta / 1000)
end if
end if
end sub
if i change it into:
If ModifierKeys = (Keys.Control Or Keys.Alt) Then
stop working. How can i detect both keys, but not combined?
If ModifierKeys = Keys.Control OrElse ModifierKeys = Keys.Alt Then
那确实应该是显而易见的。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.