Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weird Ctrl-J behavior
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00729486
Message ID:
00729730
Views:
18
Sorry, I guess that term is ambiguous. I meant that I don't see the behavior when I run using DO FORM xxxxx, but I do see it when I call my main module and then select form xxxxx from the menu.

Anyway, I found that I can suppress this behavior by turning on KeyPreview in my base form class and putting this code in KeyPress() of that same class:
LPARAMETERS nKeyCode, nShiftAltCtrl
IF nKeyCode = 10 AND nShiftAltCtrl = 2
    NODEFAULT
ENDIF
This means that users won't be able to use Ctrl-Enter to fire a default button either. In my app, that's an okay tradeoff because I really didn't want the Ctrl-J behavior.

So you led me to a decent resolution here. Thanks!
zahid

>Me neither :-) By standalone, do you mean in an EXE? It seems to work the same for me either way...
>
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform