Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keypress and Pages...Activepage
Message
From
21/06/2004 04:58:44
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00914826
Message ID:
00915578
Views:
10
Hi Sergey,

Got it.

Thank you - and Cetin.

BR

Peter

>Hi Peter,
>
>You add NODEFAULT in the KeyPress method to discard keystroke you processed. W/o NODEFAULT that keystroke will be processed by VFP after your code is finished. The NODEFAULT command only sets flag that VFP checks after your code is done so it dosn't matter where it's placed. I always place it after keystroke process is done to be consistent.
>
>
CASE nKeyCode = 148
>   TRY
>     .Pages1.ACTIVEPAGE = .Pages1.ACTIVEPAGE + 1
>   CATCH
>     .Pages1.ACTIVEPAGE = 1
>   ENDTRY
>   NODEFAULT
>
>>Long time no hear! How are you doing? I tried clearing the keyboard buffer, and that works.
>>
>>Q: Where? Why?
>>
>>
>>>>I believe this should work, and to a degree it does:
>>>>
>>>>All prequisites are in order, and in debug mode it performs exactly as intended. In real life it tends to skip a page most of the time.
>>>>
>>>>
>>>>CASE nKeyCode = 148
>>>>   TRY
>>>>     .Pages1.ACTIVEPAGE = .Pages1.ACTIVEPAGE + 1
>>>>   CATCH
>>>>     .Pages1.ACTIVEPAGE = 1
>>>>ENDTRY
>>>>
>>>
>>>Add a nodefault.
>>>Cetin
Peter Pirker


Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?

(Woody Allen)
Previous
Reply
Map
View

Click here to load this message in the networking platform