Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form keypress Conundrum
Message
 
 
To
12/01/2006 02:37:26
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01085658
Message ID:
01086030
Views:
32
>>Updated form keypress event (for future and lurkers):
>>
>>   DO CASE
>>      CASE nKeyCode = 18 .AND. nShiftAltCtrl = 0  && Page Up
>>         *--TCH 01/11/2006 Issue#3841 Courtesy Gregory Adam UT Thread 1085658
>>         NODEFAULT
>>         IF VARTYPE(THISFORM.ACTIVECONTROL) = "O" .AND. !ISNULL(THISFORM.ACTIVECONTROL) .AND. ;
>>               PEMSTATUS(THISFORM.ACTIVECONTROL, 'SetFocus', 5)
>>            THISFORM.ACTIVECONTROL.SETFOCUS()
>>         ENDIF
>>*--Etc
>>
>
>Think you can shorten this a bit since vartype returns 'X' for null
>
>if( (vartype(m.thisform.ActiveControl) = 'O') and  PEMSTATUS(m.thisform.ActiveControl, 'SetFocus', 5) )
>...
>endif
>
I believe vartype(thisform.ActiveControl) will bomb out.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform