[英]VB.net SendKeys to send keys combined not using “ALT” or “CTRL”, like “{INS}(S)”
[英]Detect more than 1 modifier keys (ctrl & alt) not combined
如何檢測超過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
停止工作。 我如何才能檢測到兩個鍵,但不能將它們組合?
If ModifierKeys = Keys.Control OrElse ModifierKeys = Keys.Alt Then
那確實應該是顯而易見的。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.