Stoitcho
Mon Apr 26 08:52:39 CDT 2004
Hi Case,
I would suggest the same as Elp did. Using System.WindowsForms.Timer control
you won't have threading problems. However, I want to add that if you insist
using System.Timers.Timer class you can still get rid of the threading
problems setting Timer.SyncronizingObject property with reference to your
Form or control. If that property is set the Timer objects will call
Control's BeginInvoke for you and will switch the execution to the UI
thread.
--
B\rgds
Stoitcho Goutsev (100) [C# MVP]
"Case" <anonymous@discussions.microsoft.com> wrote in message
news:67C06FB6-DE01-4CCF-8F28-552E257AA4F5@microsoft.com...
> How might one do this?
> Update windows form TextBox.Text w/ a timer(c#). There is a threading
issue here.
>
> I tried:
>
http://blogs.msdn.com/csharpfaq/archive/2004/03/17/91685.aspx
>
> And got:
> System.InvalidOperationException: Cannot call Invoke or InvokeAsync on a
control until the window handle has been created.
>
> Thanks!