professional web development and design
 

Multi-Threading in .NET WinForms - Part 2

/// <summary>
/// Called from the thread start in the the 
/// above method
/// </summary>
private void StartThread()
{
	// a timer that ticks every minute
	System.Threading.Timer timer = new System.Threading.Timer(new TimerCallback(Tick), null, 30, 60000);
	Thread.Sleep(60000);
}

/// <summary>
/// delegate that allows to create instances
/// of the notification form on it's own thread
/// </summary>
delegate void ShowNotificationDelegate();


Page 3 demonstrates the Tick method and the delegate invocation.

back to Multi-Threading in .NET WinForms Part 1 back next ASP.NET dynamic user controls
Valid HTML 4.01