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
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