Thursday, February 19, 2009

Accesing a Control From another thread

You can’t access a Form control from a thread other than main thread directly you must

define a delegate

  delegate void SetTextDelegate(string text);
 SetTextDelegate spd = new SetTextDelegate(YourMethodName);
than use invoke
 this.Invoke(spd, new object[] {paramater to pass});
thats all