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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how create and set timer object in start.prg

Status
Not open for further replies.

kosta

Programmer
Feb 9, 2001
186
CA
Hi All,
i'll develop a internal messaging system. And will be a msg.dbf and msgsend form on my project. But i want set a timer object in my start.prg from the start and timer object will detect new messages while user logging to the system and show it on a form ,if its not marked .t. (has been read) . How can i do this ? how would be the msg.dbf structure ? how would be the msgsendrcv.scx structure ? and how can i set a timer in my start.prg will detect for a new messages for active user till user close the program ...

all replies will be very appricated.. TIA

Soykan OEZCELIK
 
And will be a msg.dbf and msgsend form on my project. But i want set a timer object in my start.prg from the start and timer object will detect new messages while user logging to the system and show it on a form ,if its not marked .t. (has been read)

Put the following in your main program.

Code:
Public omsgTimer
omsgTimer = Createobject('msgtimer')
Define Class msgTimer As Timer
	Interval = 3000  && Three seconds
	Procedure Timer
	Select * From mymessages Where unread = .T. Into Cursor unread
	Scan
&& Do stuff
	Endscan
Endproc
Enddefine


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
kosta,

Your other thread appears to be a duplicate of the timer question you asked here.

Placing a Timer Control on a .prg
thread184-919575

Please don't create duplicate threads, as I answered that other thread only to come to this thread and discover that Mike had already answered this.

boyd.gif

 
Thanks for the reply Mike :)

Soykan OEZCELIK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top