I am having trouble opening an inherited form in a Windows CE application. This is a project that I am taking over from a ex-employee, but there is compiled versions running on
You can clearly see from the stack trace that your base form's Load event handler is running and throwing an exception. This is normal, events in the base form like Load and Paint run at design time as well. It provides the WYSIWYG designer view. This however goes poorly if that code can only work properly at runtime.
The Control.DesignMode property was meant to provide you with a way to check if the code in the the class is operating at design time. Unfortunately it is not available in CF so a different approach is needed. The magic incantation looks like this:
private void frmBase_Load(object sender, EventArgs e) {
if (this.Site == null || !this.Site.DesignMode) {
// Not in design mode, okay to do dangerous stuff...
this.UpdateOnline();
}
}