But, if none of your calls are in the constructor/InitializeComponent(), then it very well could be that nesting user controls confuses the DesignMode property. I haven't actually tried this.
And don't worry about nesting UserControls... it's actually good practice Any time you can re-use code is a good thing (without copying it ).
I have a form that contains a UserControl. This UserControl has a few different sections which are also UserControls and those UserControls also contain another user control. (I only did this because this particular display is used on various forms). It appears that if you go deeper that two user controls the me.DesignMode is no longer recognized. When I commented out this code the form loaded properly.
If Not Me.DesignMode Then myBo.FillWhatever()End If
This will keep it from trying to access the database at design-time.
As for the SharedDataTableProblem, I believe there is an outstanding issue on the SharedDataTables at design-time (we might have forgotten a test on Me.DesignMode ourselves). If this is the case, it will be fixed soon.
I have also had problems with my forms that use a SharedDataTableKey. All of a sudden I can't open these forms because the sharedDataTableKey is not defined.
Any idea's why this is happening and how to resolve? I have tried cleaning and rebuilding my solution but it didn't help.
Thanks,
Tim