Multithreading and Usercontrols

Inferno122

Newcomer
Joined
Jul 31, 2003
Messages
6
Location
Philippines
Hi! I'm back again, this time with a different problem :(

I have recently discovered how to utilize the threading in .NET and I've seen a lot of potentials. I have created a class that fades the from in at when it loads and fades out when it closes. It worked! Then came the timer problem, but I fugured out that form timers are single threaded so they won't work, therefore system timers will be the alternative.

Ok... timer control replaced by another timer control worked. But what about user controls? I have created a user control that displays the time of the day, for simplicity first, i used the label control (but I have other design for this.) Now the proble is, once I use the form fading thread, the control won't update :( But if I simply load the form, the control updates :(

I there anything that I missed in the creation of a user control to work with multi threads? :(
 
You can only access controls on the UI thread from an auxiliary thread by calling the Control.Invoke() method, passing in a delegate and an optional array of parameters.
 
Back
Top