Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Time Box Class & Keypress
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00717611
Message ID:
00717622
Views:
33
This message has been marked as the solution to the initial question of the thread.
H Kirk,

Is it typo or instead of the list of number you're using string in INLIST()? Also add NODEFAULT to ignore those keys.
IF INLIST(nkeyCode,122,120,99,118,98,110,109,44,46,47)
	this.Value=ctSetProcTime(nKeyCode,this.value)
	NODEFAULT
ENDIF
>I downloaded (a long time ago) a little Timebox class that validates that the text entered is in HH:MM:SS format and it works great. I wanted to modify it so that if the user pressed any of the keys on the last row of the keyboard (zxcvbnm,./) that it would get set value and enter into the field. A basic quick time entry button. So in the keypress event of the class, I put the following code:
>
>
>IF INLIST(nkeyCode,'122,120,99,118,98,110,109,44,46,47')
>	this.Value=ctSetProcTime(nKeyCode,this.value)
>ENDIF
>
>
>I put it on a form, and it worked...well the quick keys worked. But then if the user tries to type numbers into it, it just replaces the stays in the first two spots. The class had no code in the keypress event and if I comment out my code it works fine again (minus the keypress events). The only non-default properties on the class are:
>
>InputMast: 99:99:99
>Format: K
>
>Anybody know what I'm missing.
>
>Thanks
>Kirk
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform