Hi,
I'm trying to get a seperate class, initialized by a form class, to
manipulate certain objects on the form (ex: add to a listbox). The
manipulation will occur via a thread that is not the normal WinForm GUI
thread. How would I go about doing this?
I have this code for cross-thread WinForm manipulation, but only from within
the WinForm class:
public delegate void LogDelegate(string txt);
public void Log(string txt)
{
if (InvokeRequired)
{
Invoke(new LogDelegate(Log), txt);
return;
}
lstLog.Items.Insert(0, DateTime.Now.ToString("T") + " - " + txt);
}
Thanks,
Ian