Hi,
I've just run into a problem where my windows form displays correctly in the
VS IDE designer (#2.0), but has started appearing as a blank (default) form
at run time (it used to work). Using break points I've noticed that
InitializeComponent() does not appear to be called for this form, so none of
my components are being set up. If I rename "InitializeComponents()" I get
the same issue in design mode. Has anyone else run into this before, I'm
not completely sure how the design time editor can be happy with the code
and display my form correctly, but the run time engine does not. Is this
some form of corruption that will require me to recreate my form - or is
there a work around?
Please forgive me if this is a common question, I've searched the forums and
google'd but didn't find anything similar.
- Paul.
Joanna Carter [TeamB] - 07 Aug 2006 12:34 GMT
| I've just run into a problem where my windows form displays correctly in the
| VS IDE designer (#2.0), but has started appearing as a blank (default) form
[quoted text clipped - 6 lines]
| some form of corruption that will require me to recreate my form - or is
| there a work around?
Are you calling the default parameterless constructor provided, or are you
using another one at runtime and not calling it at all ?
public Form1()
{
InitializeComponent();
...
}
Joanna

Signature
Joanna Carter [TeamB]
Consultant Software Engineer
Paul - 07 Aug 2006 13:03 GMT
Thank you for indirectly solving my problem bit of a homer simpson "Duh!"
required, commenting out some code in my forms default constructor had
included the "InitializeComponent" call (so of course it wasn't being called
a runtime). I'd only out a breakpoint in the formload and
initializecomponent() methods so missed this ever so slightly obvious issue.
Thanks once again. I guess that the designer calls initializecomponent
without calling the form constructor (which makes sense).
> | I've just run into a problem where my windows form displays correctly in
> the
[quoted text clipped - 26 lines]
>
> Joanna