General information
Category:
Windows API functions
Bela
Thanks for your advice and the cppTimer ... hope I can get it to work :o)
I try to implement your suggestions although I don't have a goApps I'll try to incorporate something similar.
Will let you know how it goes.
Thanks Bela
P.S. By the way, Larry's _Screen.ActiveForm.MyFunc() worked. Had to use a macro subst. though:
This did not work:
SetUpTimer(1,200,"_Screen.ActiveForm.DoThisMethod()")
But this did:
lcMethod = _Screen.ActiveForm.DoThisMethod()
SetUpTimer(1,200,"&lcMethod")
Strange eh?
:o)
>Hello Mal,
>
>thank you for using my cppTimer!
>
>You assume that cCommand will be evaluated as would be eveluated by a VFP evaluate() command without any object enviroment.
>So you must provide a valid object reference.
>
>e.g.:
>
>public goMyForm
>
>goMyForm=thisform
>
>WITH THISFORM
>.....SetUpTimer(1,200,"goMyForm.DoThisMethod()")
>ENDWITH
>
>I hope this helps.
>
>bb
>
>U.I.: if you don't like public variables, (as me), there is a other way.
>I always have an goApp public variable. Add a method to this object like OnCPPTimer:
>
>lparameter tcFormName, tcFormMethod
>
>for i=1 to _screen.FormCount
> if _screen.forms[i].name=tcFormName
> evaluate("_screen.forms[i]."+tcFormMethod+"()")
> exit
> endif
>endfor
>
>
>And here is how to start the timer:
>WITH THISFORM
>.....SetUpTimer(1,200,"goApp.OnCppTimer("+thisform.name+",anymethodname)")
>ENDWITH
>
>of course your form name must be unique among other forms.
>
>
>>Hi:
>>
>>I Downloaded cppTimer.FLL from the Files section.
>>
>>The sample program runs great!!!
>>
>>This is how you start the timer and execute a command:
>>SetupTimer(nTimerNo,nTimerInterval,cCommand)
>>i.e. SetUpTimer(1,200,"QUIT")
>>
>>From within my form, SetUpTimer(1,200,"QUIT") executes and shuts down
>>my program.
>>
>>However, a line such as ...
>>
>>WITH THISFORM
>>.....SetUpTimer(1,200,".DoThisMethod()")
>>ENDWITH
>>
>>does nothing.
>>
>>What's up with that?
>>
>>TIA
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only