Is it really necessary to resort to threads here? And if the answer is yes, then more specifically, is it really necessary to resort to multiple GUI-altering threads? Why not just make the main (GUI) thread have a method that updates the text box and a Timer control that triggers after 10 seconds to reset the contents of the text box. When a new text-event occurs, your method is called again, and you reset the timer to 10 seconds again. Something in the way of (incomplete code):
void AddNotification(string NotifyText)
{
// Note: depending on if you're sticking to multiple threads,
// you might actually need to use Invokes here. Possibly you could
// force the caller to do the Invoke and throwing an exception if
// the caller didn't
Timer1.Enabled = false;
MessageLbl.Text = NotifyText;
Timer1.Enabled = true;
}
// Timer event function (can't remember at the top my head how C# names it exactly)
void Timer1_Timer(object sender)
{
Timer1.Enabled = false;
MessageLbl.Text = "Default text here";
}
With Timer1's timeout set to 10 seconds. If your GUI thread is doing some intensive work, then the timer might not fire until after the work is done. If that is a problem, thát would be the time to use threads, to do the work in a background thread while the GUI remains responsive. All in all, it's best to have the main thread handle all GUI.