P
PCH
I have a main form that loads and stays open.
I have 3 other forms that I want to open, which each do various displays /
tasks. Each has 1+ timers on them as well.
I'm worried that the timers will overlap and will execute code at the same
time.. degrading each other performance.
I was thinking about loading each of those forms into its own thread,
instead of just calling new/show from the main program thread.
The problem I have is when i create a new thread and open the form in it..
it opens.. but once the threadstart finished.. the thread closes itself! So
the form closes! I saw some examples where you can do a loop and sleep that
thread until you want to close it, and that solves the automatic closing
problem, but then the form it has loaded never does anything because its
forced to sleep over and over!
So.
How can I load a form into a new thread, keep that thread open, and have the
form go on its merry way without impacting performance?
Thanks
I have 3 other forms that I want to open, which each do various displays /
tasks. Each has 1+ timers on them as well.
I'm worried that the timers will overlap and will execute code at the same
time.. degrading each other performance.
I was thinking about loading each of those forms into its own thread,
instead of just calling new/show from the main program thread.
The problem I have is when i create a new thread and open the form in it..
it opens.. but once the threadstart finished.. the thread closes itself! So
the form closes! I saw some examples where you can do a loop and sleep that
thread until you want to close it, and that solves the automatic closing
problem, but then the form it has loaded never does anything because its
forced to sleep over and over!
So.
How can I load a form into a new thread, keep that thread open, and have the
form go on its merry way without impacting performance?
Thanks