VB.NET高手向這看
我在視窗中放置了一個BUTTON1,現我想用這種方試激發BUTTON1的事件:同時按下SHIFT鍵和鼠標左鍵.請問怎麼樣實現.請給出在.NET中調試通過的代碼.不勝感激!!!!!
謝謝你的提示.我編出了一個,感覺很爽. Dim strkey As Boolean
Private Sub Button1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseDown If strkey = True Then strkey = False MsgBox("") End If End Sub
Private Sub Button1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Button1.KeyDown If e.Shift = True Then strkey = True End If End Sub
Private Sub Button1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Button1.KeyUp strkey = False End Sub