System.InvalidOperationException: Invoke or BeginInvoke cannot be called on a control until the window handle has been created. at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous) at System.Windows.Forms.Control.BeginInvoke(Delegate method, Object[] args) at System.Windows.Forms.WindowsFormsSynchronizationContext.Post(SendOrPostCallback d, Object state) at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(ContextCallback callback, Object state, Task& currentTask) --- End of stack trace from previous location --- at System.Threading.Tasks.Task.<>c.b__128_1(Object state) at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() System.ComponentModel.Win32Exception (1406): Error creating window handle. at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp) at System.Windows.Forms.Control.CreateHandle() at System.Windows.Forms.Control.CreateControl(Boolean ignoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e) at System.Windows.Forms.ButtonBase.OnVisibleChanged(EventArgs e) at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e) at System.Windows.Forms.Form.OnVisibleChanged(EventArgs e) at System.Windows.Forms.Control.SetVisibleCore(Boolean value) at System.Windows.Forms.Form.SetVisibleCore(Boolean value) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(msoloop reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(msoloop reason, ApplicationContext context) at System.Windows.Forms.Form.ShowDialog(IWin32Window owner) at PKHeX.WinForms.ErrorWindow.ShowErrorDialog(String friendlyMessage, Exception ex, Boolean allowContinue) at PKHeX.WinForms.Program.CurrentDomain_UnhandledException(Object sender, UnhandledExceptionEventArgs e)