form state persistent, redux
Ok, so I started actually using my recently mentioned form state persistence
component, and i unfortunately found what seems to be a bug in vstudio.
The component checks its DesignMode property for false before it tries to do
its thing, even before it actually associates itself with the form in the .Form
property's set accessor.
So I drag the component on a "base" form for the app, and all is well.
However, when I derive from that base form and try to open the derived Form
in the designer, vstudio just gives me a crappy "there was an error "... blah
blah blah. After a while of sniffing around, I attached another instance of
vstudio and debugged when I opened my child form in the designer.
It seems that there is a bug where, when you have a form inherit from another
form, the base form is not set to be in design mode, and neither are any
components that exist on the base form. OOPSIE.
So I wrote a horrible hack that catches an exception from a call to
Application.CompanyName. This will throw an exception at DesignTime, because it
tries to get the CompanyName of devenv.exe, and devenv.exe isn't a .net app.
Anyway, if anybody was already using it, go get the Latest
Version