Home All Groups Group Topic Archive Search About

code execution on child form @ design time?

Author
22 Dec 2006 2:31 PM
Scott
I have a project that has inherited forms and it seems at times the
code is running on the children forms during design time making me more
work to try to detect that I am in design mode and have the  forms not
run.   1) Why does this happen?  2) Suggestions on what to do?

Many thanks and happy holidays,

Scott Emick
VB Programmer

Author
22 Dec 2006 3:00 PM
lord.zoltar
Scott wrote:
> I have a project that has inherited forms and it seems at times the
> code is running on the children forms during design time making me more
> work to try to detect that I am in design mode and have the  forms not
> run.   1) Why does this happen?  2) Suggestions on what to do?
>
> Many thanks and happy holidays,
>
> Scott Emick
> VB Programmer

I think this may happen if your form runs code, specifically, the New
procedure or possibly some of the properties.
One way I've fixed this problem is moving the code that is causing the
problem to a seperate procedure, and only call it when it runs.