I would like to make a program which executes tasks by pressing keys, but it seems only possible to make command buttons to click on whith the mouse. What are the commands for linking keys with tasks?
You can set the KeyPreview option on your main form to True and then keypresses anywhere in your application will be routed to the KeyPress on that form. There, you can use a Case-Select statement to determine what function to call. The other option is to use command buttons and use the & character in the name (i.e. &File = File) . . . that will allow keypresses to control you app, but in that case, the user will have to hold down the Alt key while pressing the other keys. - Jeff Marler B-)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.