Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

timer control

Status
Not open for further replies.

chinkoh

Programmer
Mar 15, 2002
8
MY
_Screen.AddProperty('oTimer')
_Screen.oTimer = NewObject( 'timer_fb' , 'proctrls.vcx' , 'sfbw.app' )

I have try program every is ok .. It run OK ( when I compile in APP ) ...

but if I compile into EXE ,,, it give me error ---> Object is not contained in a Forms

I put this code at my main prg...

so how to solve...??
 
A timer must be contained in a form, which the screen isn't anymore when you build an exe. Is there a form in your app you can place it on or are you running strictly from a .prg?

Dave S.
 
chinkoh

You don't need to put the timer anywhere, this code works, and if you make the variable public, the timer will stay throughout the session

Code:
Public oTimer
oTimer = creat("myTimer")
DEFINE CLASS myTimer as Timer
 *set the interval
 * Set the timerevent
ENDDEFINE

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top