[英]Detect more than 1 modifier keys (ctrl & alt) not combined
How to detect more than 1 moddifier keys? 如何检测超过1个修饰键? ( Alt
& Ctrl
)? ( 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. If ModifierKeys = (Keys.Control Or Keys.Alt) Then
停止工作。 How can i detect both keys, but not combined? 我如何才能检测到两个键,但不能将它们组合?
If ModifierKeys = Keys.Control OrElse ModifierKeys = Keys.Alt Then
那确实应该是显而易见的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.