Is there a way of destroying all objects when a form closes so that the
correct objects
can be created once the form is REopened? error i am getting is :
"OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN OBJECT"
when opened and closed repetedly and alternating between the 2 "modes"
(AddEmp and ModifyEmP).
If the project is shutdown and restarted this error doesn't occur.
Thanks in anticipation!!!!
Bernie Yaeger - 29 Oct 2004 20:05 GMT
Hi Chris,
Show us some code, Chris; I doubt that your assumption is correct.
Bernie Yaeger
> Is there a way of destroying all objects when a form closes so that the
> correct objects
[quoted text clipped - 8 lines]
>
> Thanks in anticipation!!!!
Frank Uray - 30 Oct 2004 16:22 GMT
Hi
You maybe try to open the form like this:
if (yourform.IsDisposed)
{
yourform = new yourform();
}
best regards
Frank
> Is there a way of destroying all objects when a form closes so that the
> correct objects
[quoted text clipped - 10 lines]
>
> Thanks in anticipation!!!!