chlade
asked on
KeyPreview = True and hotkeys
I have a form that needs to trap for a keypress at the form level. However, when I set KeyPreview to True it causes hotkeys and the Accept button to not work.
For instance, I have a button called Add with the A as a hotkey. The button is also the AcceptButton for the Form. When I press ALT-A or press Return, the button is not pressed. How can I make this happen?
For instance, I have a button called Add with the A as a hotkey. The button is also the AcceptButton for the Form. When I press ALT-A or press Return, the button is not pressed. How can I make this happen?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The program is compiled as a DLL that is then loaded from our Accounting system. This is where the problem is. When I change the program to a standard Windows program and run it, it's fine. There are a lot of flaky things going on when calling programs from our Accounting system so I'm sure that this is just one more. Thanks!