Hi there,

I need an advice for threading with windows.forms aso.
I got a little Windows.Forms application, after starting it I have to
instantiate some other classes (no forms classes) that have to run in a
seperate thread and - the most important thing: this classes have to be kept
alive as they are using some timers that frequently check some data from the
operating system. The problem is when I create a new thread and set a method
as starting point that instantiates this classes aso the thread is closed
after the instantiating, there is no reaction on the event handlers of the
instantiates classes. How can I keep the Thread alive?

I tried it like this:

Thread t = new Thread(new ThreadStart(ThreadJob));
t.IsBackground = true;
t.Start();

...

void ThreadStart()
{
Job1 j1 = new Job1();
j1.StartWorking();
...
}

Thanks in advance!

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to