Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 5.0 & SetFocus()
Message
From
17/12/1996 15:41:14
Paul Watson
Mcv Global Systems, Inc.
Pasadena, California, United States
 
 
To
17/12/1996 15:30:46
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00015359
Message ID:
00015399
Views:
42
I made a few minor changes and plugged it into my routine as follows:

* Force the Valid() event for the current prompt...
IF TYPE('ThisForm.ActiveControl') = 'O'
*-- Can't use SetFocus() if called from a Valid() or Activate() Method.
LOCAL lcProgram,lnCompteur,llOkayToSetFocus
lcProgram=PROGRAM(1)
lnCompteur=2
llOkayToSetFocus = .T.
DO WHILE LEN(lcProgram)>0
lcProgram=EVALUATE('PROGRAM('+ALLTRIM(STR(lnCompteur))+')')
lnCompteur=lnCompteur+1
IF INLIST(UPPER(RIGHT(lcProgram,6)), '.VALID', 'WHEN', 'ACTIVATE')
llOkayToSetFocus = .F.
EXIT
ENDIF
ENDDO
IF llOkayToSetFocus
ThisForm.ActiveControl.SetFocus()
ENDIF
ENDIF


It works perfectly! Thanks again.
Paul Watson
MCV Computer Consultants
MCV Global Systems, Inc.
pWatson@PrimeNet.Com
Previous
Reply
Map
View

Click here to load this message in the networking platform