I assume you are getting this cross-thread exception as you are trying to update screen elements from your code stream. If you need to do this, you can get a simple solution using an anonymous method.
Suppose you want to add an item to a ListBoxLog. This code will do the trick from any thread:
ListBoxLog.Invoke((MethodInvoker)delegate { ListBoxLog.Items.Add("Done"); });
There is also a property to check .InvokeRequired, you can check if the call is called. Usually you check this property in a function that can be called both by the main user interface thread and by any background thread.
BeginInvoke, Invoke. BeginInvoke .