public static void Debug(string s) { if (thisForm.InvokeRequired) { ShowDebugDelegate tmp = new ShowDebugDelegate(thisForm.ShowDebug); thisForm.Invoke(tmp, s); } else { thisForm.ShowDebug(s); } }