Link to home
Start Free TrialLog in
Avatar of Spikeman
Spikeman

asked on

Timesharing - getting multiple routines to run at once

I have a MDI application. Each child form has it's own routines. after starting a routine on one form and then starting another routine on another form, the first form routine quits or locks up. I would like to time share between the two. How can I do this - run multiple routines at once?
Avatar of Z_Beeblebrox
Z_Beeblebrox

The easiest way is to put DoEvents all over the place. This will give you quasi time slicing. A better way may be to use out of process ActiveX exe's. It may also be possible to multi-thread your application but I have no idea how.

Zaphod.
ASKER CERTIFIED SOLUTION
Avatar of rspahitz
rspahitz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Spikeman

ASKER

Thank you. I have timers currently in my code but since I'm monitoring com ports for data it makes putting my routines in a timer difficult as I'm triggering off of the MScomm_Oncomm event. Thanks again!
Thank you. I do have doevents all over but since I was using the MScomm_Oncomm event to trigger on Com port inputs it kept the focus tied up there. I should of mentioned this in my question. Thanks again.