Not too sure what you are trying to achieve, but this code seems to work. Keep in mind that for a modifier keypress event to register in this example (SHIFT), a second key has to be pressed (eg "a"), as well as the left mouse button.
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As _ System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If ((Control.ModifierKeys And Keys.Shift) = Keys.Shift) _
And Control.MouseButtons = MouseButtons.Left Then
' Do This
Else
'Do That
End If
End Sub
|