如何检测超过 1 个修饰键?( 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
停止工作。我怎样才能检测到两个键,但不结合?