Reputation: 1598
I have the following event handle in my Visual Basic.NET project form (VS 2013).
I wanted to know if I can modify it so that I can distinguish between a normal click and when someone is holding either SHIFT
button during the button press.
Private Sub btnLLDoubleDip_Click(sender As Object, e As EventArgs) Handles btnLLDoubleDip.Click
' Double Dip is easy...
' Stop the timer
' Create a flag that this is now a double dip attempt, NO MORE WALK OUTS
End Sub
Upvotes: 4
Views: 1987
Reputation: 81620
You can use the ModifierKeys.HasFlag function for that:
If ModifierKeys.HasFlag(Keys.Shift) Then
MessageBox.Show("Shift is pressed")
Else
MessageBox.Show("Shift is not pressed")
End If
Upvotes: 7