I have an assignment from school where the program is supposed to close when the user presses Alt X.
I have done this using Java but that was a long time ago and I can’t remember how I did it. How do you do it in VB?
Thanks for the help
Edit:
Thank you for all the help.
But i cant get it to work:
If e.KeyCode = Keys.Alt AndAlso e.KeyCode = Keys.X Then
Application.Exit()
End If
Try it like this (and for a form, make sure
KeyPreview=True):