` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please 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!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

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,,). This way the window is always open and doesn't grab focus from other windows in your app or other apps.


Today is May 7, 2024, 9:48 am
This article has been viewed 35117 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: