Key combinations....Raise Event

G

Guest

If i put this code
If e.Control = True And e.Alt = True And e.KeyCode = 82 The
MessageBox.Show("SUCCESS"
End I
in the event KeyDown of a textbox it works fine.... but i want my combination key to raise in the form how can i do it
 
H

Herfried K. Wagner [MVP]

* "=?Utf-8?B?TnVubw==?= said:
If i put this code :
If e.Control = True And e.Alt = True And e.KeyCode = 82 Then
MessageBox.Show("SUCCESS")
End If
in the event KeyDown of a textbox it works fine.... but i want my combination key to raise in the form how can i do it?

Use the form's 'KeyDown' event and set its 'KeyPreview' property to
'True'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top