Hector,
The solution I came up with is using a Timer class:
DEFINE CLASS programmabletimer AS timer
commandline = ("")
Name = "programmabletimer"
PROCEDURE settimer
LPARAMETERS nInterval, cCommandline
THIS.Interval=nInterval
THIS.Commandline=cCommandline
ENDPROC
PROCEDURE Timer
THIS.Interval=0
cCommand=THIS.Commandline
&cCommand
ENDPROC
ENDDEFINE
Drop the timer on your form, and issue the following command from your valid event:
THISFORM.ProgrammableTimer.SetTimer(10,"THISFORM.YourControl.SetFocus")
Whenever VFP enters a wait state (thus after the valid) it fires the timer and your command (whatever it is).
Good luck,
Walter,
>Hi all
>I really need to perform a SETFOCUS inside a VALID event, how can i do this?
>My valid event call a generic code, inside this code i need to perform the setfocus. Does anyone have this problem before?
>
>Thanks in advance
>Héctor L.