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

Is it possible to pause other processes when the timer fires ?

Status
Not open for further replies.

sfr10000

Programmer
May 22, 2006
12
0
0
DO
I am trying to use to timer to determine when it is time to start another process. I have observed the my ongoing processes are not independent of the processes I started when it was time to do so. Specificly when the process started by the timer selected a different data file and my ongoing process then has the newly selected data file as its data file. Any way to pause the ongoing process until the time triggered process is complete, or alternatively keep the two process seperate ?
 
Yes, but only indirectly.

Assuming that the running processes have some kind of loop structure, all you have to do is get that process to check some visible (to the process, not the user) property and if it is set (or unset) get the loop to pause. Then when you start your new process remember to set that property as it initiates enter and unset it as it closes.





Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
for me it is eaiser to control when the timer process fires. Im my main process i will set the timer.interval to 0 [zero] while my process compleates. then when my main preocess is done it will set the timer to its proper interval time

Steve Bowman
Independent Technology, Inc.
CA, USA
 
regarding data/alias access, you can keep two processes seperate by using seperate datasessions.

A timer event should always be programmed to reset for example the current work area, so it does not cause side effects. But a timer does not run parallel to the main process, it interrupts the process and after finishing gives back control.

if you start a differnt process via a timer, and want that new process to have it's own environment, you have several possibilites. Some that come to my mind are, starting a new process by starting a new instance of an EXE, creating a form with private datasession, creating some processing class based on the session class (non visual).

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top