Forms / Threading / Timers

F

Frank Uray

Hi all

I have some trouble with Threading in Forms application.
- Standard System.Windows.Forms.Form
- OnShown I create a new thread
- in this new thread I create a new System.Timers.Timer
- On Timer.Elapsed I do some SQL database actions
There are no form invoke within the thread/timer
and also the form does nothing but always when
Timer.Elapsed the form is blocked ...

How can this be done ?? Do I have to create a AppDomain
get real MultiThreading ??

Thanks and best regards
Frank Uray
 
P

Peter Duniho

Frank said:
Hi all

I have some trouble with Threading in Forms application.
- Standard System.Windows.Forms.Form
- OnShown I create a new thread
- in this new thread I create a new System.Timers.Timer
- On Timer.Elapsed I do some SQL database actions
There are no form invoke within the thread/timer
and also the form does nothing but always when
Timer.Elapsed the form is blocked ...

Blocked? In what way? Are you trying to access the form data
structures from the thread? If not, how could the form be affected at
all? If so, what synchronization technique are you using, if not
Control.Invoke()?
How can this be done ?? Do I have to create a AppDomain
get real MultiThreading ??

No, of course not.

But without a concise-but-complete code example showing what you've
done, which reliably demonstrates the problem you're describing, and a
clear, precise description of the problem itself, it's not possible to
explain what you've done wrong.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top