private void RunWhenIdle(EventHandler eventHandler) { Application.Idle += eventHandler; if (!this.CanUseApplicationIdle) { SynchronizationContext.Current.Post(delegate(object x) { Application.RaiseIdle(EventArgs.Empty); }, null); } }