Login
`
Templates, Tools and Utilities
|
||
Add a comment to an Icetips ArticlePlease add your comments to this article.
Please note that you must provide both a name and a valid email address in order
for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!
Back to article list Search Articles Add Comment Printer friendly Direct link Par2: Running a process in the background 2004-12-20 -- Lee White What I've always done in cases where I want a background process to
STAY in the background is to start it on its own thread when the app
is loaded. I then put it to sleep and wake it up whenever it's needed
by setting the TIMER on the hidden window.
--global equates--
EVENT:Sleep EQUATE(500h)
EVENT:Wake EQUATE(501h)
MyProc PROCEDURE
Window Window...Timer(1)
END
CASE EVENT()
OF EVENT:OpenWindow
POST(EVENT:Sleep)
OF EVENT:Sleep
0{PROP:Timer} = 0
OF EVENT:Wake
< do any housekeeping here >
0{PROP:TImer} = 1
OF EVENT:Timer
< do processing >
...
END
When needed, simply POST(EVENT:Wake,,
Today is November 21, 2024, 7:03 am This article has been viewed 35225 times.
|
|