I checked the INKEY() documentation as you suggested. Ctrl-J is actually equivalent to Ctrl-Enter, and as you guessed, both exhibit the behavior. However, Ctrl-M doesn't fire the button click, even though Enter does. I'm not sure what that means though.
I am reluctant to explain it based on the INKEY() return codes because it doesn't happen when I run the form standalone.
I may mess around with KeyPreview and KeyPress. If so, I'll post my results.
Thanks for your help!!!
zahid
>Yep. CTRL-J = LF, interpreted as ENTER. Check INKEY() in the help file. Wierd. I am sursprised CTRL-M doesn't also do it.
>
>>In my app, when:
>> * focus is on a button, or
>> * focus is on something else but a button has DEFAULT = .T.
>>and the worker presses Ctrl-J, that button's Click event fires. This doesn't happen when I run a form standalone (DO FORM MyForm), but it does happen when I run the app from development mode (DO MyApp) and select the form from the menu.
>>
>>What's more interesting is the call stack. When I put a SET STEP ON in the Click() method of a button fired in this manner, there's nothing in the call stack between the method that issues READ EVENTS and the button Click() method. This is different from the following situations:
>> * When a hotkey is specified via a menu item, there's an ON SELECTION BAR in the call stack.
>> * When a hotkey is specified via ON KEY LABEL, there's an ON KEY in the call stack.
>>
>>I did a quick search of MSDN, but couldn't find anything. I also searched my MPR file, but I can't see anything in there that would cause this behavior. Any ideas?
>>zahid
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only