I've added this feature to the SDF's ControlEx class. Now it has
ControlEx.InvokeRequired property and also static method
ControlEx.InvokeRequiredForControl.
Instead of this.InvokeRequired now have to write something like this:
void SafeFunction(object sender, System.EventArgs e)
{
if (ControlEx.InvokeRequiredForControl(this))
{
this.Invoke(new EventHandler(SafeFunction));
return;
}
label1.Text = "Updated";
}
HTH
--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com
I was trying to port my existing code and found that InvokeRequired
property which exists in Framework 1.1 does not exist in Compact
Framework. Are there any workarounds?