Basic C#
Go to solution
Solved by Helius,
You need to add an "OnKeyDown" event and check which key is being pressed.
Here's an example:
//This event will be fired when a key is being pressed private void ControlName_KeyDown(object sender, KeyEventArgs e) { //If the pressed key is the 1 key, show a msgbox. if (e.KeyCode == Keys.D1) { MsgBox("Test"); } }
I think you should have a look at this: http://www.dotnetperls.com/keycode
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now