Hi,
I have a button with an image to perform a specific operation.
I want to use Alt-D as a shortcut key to simulate its click using the shortcut.
Any ideas would be appreciated much..
TIA,
Mohan
Printable View
Hi,
I have a button with an image to perform a specific operation.
I want to use Alt-D as a shortcut key to simulate its click using the shortcut.
Any ideas would be appreciated much..
TIA,
Mohan
halu,
i'm kinda new. but this might help. use the button key down. try this.
but remeber, this only performs if focused...Code:Private Sub Button1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Button1.KeyDown
If e.Control AndAlso e.KeyCode = Keys.D Then
MsgBox("blah blah...")
End If
End Sub
--ayan
If you set the KeyPreview property of your form to True then you can use Ayan's suggestion in the KeyDown event of the form. This way it would fire as long as the form has focus, not just the button.