How to tell when a form is being designed?
Posted on 2007-10-17
I've got code in my form load.
When I switch to design view, the design crashes with an exception. It looks like it is running my Load code - if I comment this out, I can see a design time view of my form.
In delphi, a form had a ComponentState property - this indicated, amongst other things if the form was being designed (you could omit certain code from executing if this was the case). Is there a C# equivalent - i.e. how can I stop the form designer from running my Load code - or at least limit which code it is trying to execute.