What exactly are trying to do? Get the button1 to perform click? What keys you want to use to enable this shortcut? the control button and P? If, yes the try this:
Code:Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown If e.KeyData = Keys.Control And e.KeyData = Keys.P Then Me.Button1.PerformClick() End If End Sub




Reply With Quote