Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
KeyPress Event don't work
Message
From
16/03/1999 04:21:30
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
16/03/1999 03:30:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00197956
Message ID:
00197964
Views:
20
>I have added several method in a formset to do Add, delete ,.etc
>and I want to use KeyPress event to execute that method so I set the form's KeyPreview property to .T.
>
>I want to execute that method with Ctr + INSERT or Ctr + DELETE
>and many more
>
>But when the form is running and I press the keyboard with that combination Key,... the method doesn't work
>
>Then I tried other approach with ON KEY LABEL but it's not work either,...
>
>Anybody have suggestions,..?
>
>TIA

Set a breakpoint in the debugger just on the second line of your form.keypress, and see what keyboard codes you actually get. They may not be what you expect them, judging by the table in the help for InKey(). I've tried to trap for ctrl+k, and the keycode wasn't the expected 107 with nAltShiftCtrl of 2, it was 11,2. You could alternatively put one "Wait Window str(nKeyCode,3) time 3" instead of the breakpoint.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform