如何检测超过1个moddifier键?(Alt
& Ctrl
(?
我有此工作代码:
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 ModifierKeys = (Keys.Control Or Keys.Alt) Then
停止工作。如何检测两个键,但不能合并?
If ModifierKeys = Keys.Control OrElse ModifierKeys = Keys.Alt Then
确实应该很明显。