I know there are other posts that say you can create a control and then check the InvokeRequired property to see if the current thread is the main thread or not
InvokeRequired
It is much more easy:
static class Program { [ThreadStatic] public static readonly bool IsMainThread = true; //... }
And you can use it from any thread:
if(Program.IsMainThread) ...