Invoke or BeginInvoke cannot be called on a control until the window handle has been created.

My app is sited on windows kiosks with touch screens and is used by the general public. A site administrator is required to run the app, log in as an admin and go to a config section to update it manually.

I have an automaticupdater 2.6.18.4 control on a form . I'm "playing" with the control right now to learn how it works.I attach most events but they're uncoded. I expect errors. In a button click event I call automaticupdater.ForceCheckForUpdate(). The following error is thrown after the button click event completes and the app goes back to idle. The error handler of the button isn't catching this, but the parent form of the config form does. Unfortunately then the app shuts down. I noticed that somebody back in 2012 said another error that had the same message would be fixed in the next version. Today is september 2015. So is this a different error? The form and controls are long created and visible."Invoke or BeginInvoke cannot be called on a control until the window handle has been created."Stack trace is as follows: at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous) at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args) at wyDay.Controls.AutomaticUpdater.auBackend_CheckingFailed(Object sender, FailArgs e) at wyDay.Controls.AutomaticUpdaterBackend.UpdateStepFailed(UpdateStepOn us, FailArgs args) at wyDay.Controls.AutomaticUpdaterBackend.updateHelper_PipeServerDisconnected(Object sender, UpdateHelperData e) at wyDay.Controls.UpdateHelper.bw_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e) at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e) at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)

This isn't a bug. You just can't check for updates using the Windows Forms version of the AutomaticUpdater when your app isn't yet created. If you want to do that (check before your form is actually created) use either the AutomaticUpdateBackend or wyUpdate as a standalone updater.

Also, you shouldn't call automaticupdater.ForceCheckForUpdate(). Ever, really. Just let the AutomaticUpdater check for updates automatically. That's what it does. Use the properties here: http://wyday.com/wybuild/help/automatic-updates/members.php. Specifically "DaysBetweenChecks" and "WaitBeforeCheckSecs".