M
moondaddy
I have a user control (uc2)which lives on another user control (uc1) on a
form (a nested user control). When I open the form in design view the the
load even fires in uc2 so the first line of code in the in its load event
is:
If Me.DesignMode = True Then Return
However, it doesnt work and code is still executing after this line. The
last line of code in the load event calls a private method which loads data
into a grid. This is the only place this private method gets called and
every time I open the form in design view I get a series of error beeps and
then I see data has loaded into the grid.
Any good advise on how to stop code from executing in design view?
Thanks.
form (a nested user control). When I open the form in design view the the
load even fires in uc2 so the first line of code in the in its load event
is:
If Me.DesignMode = True Then Return
However, it doesnt work and code is still executing after this line. The
last line of code in the load event calls a private method which loads data
into a grid. This is the only place this private method gets called and
every time I open the form in design view I get a series of error beeps and
then I see data has loaded into the grid.
Any good advise on how to stop code from executing in design view?
Thanks.