Debugging designer instantiation

  • Thread starter Thread starter GKG
  • Start date Start date
G

GKG

Hello...Im using VS.net and i have a problem with the
windowsfrom designer it when i attempt to bring up the
designer for a form (that is derives another form i made)
i get an exception message ("ExecuteReader requires an
open and available Connection. The connection's current
state is Closed") in a message box and when i click ok it
show X...An error has occured ........ instead of the form

Now how can i find out where this error occurs, can i
somehow debug this instantiation, that occurs when
starting the designer, using breakpoint and such like
when debugging the program?
 
When the designer opens a form that inherits another form,
it will run what ever is in the load event of the other
form.

You should go to that form and put this in

if not designmode then
'put all code of loadevent here
end if

The designer will hit the load event and since it's in
design mode, it will jump over the code and your problem
goes away.

Joe
 
Back
Top