Sharon:
This is an ASP.Net newsgroup, you might be better off asking in
microsoft.public.dotnet.framework.windowsforms
aside from that, I can tell you that Dipose must be implemented in such a
way that multiple calls to it aren't going to cause any problem, typically
this is achieved by using a private field named "isDisposed" or something
which is set to "false" and when Dispose() is called, something like this
happens:
if isDiposed = false then
..clean up resources
isDisposed = true
end if
therefore nothing bad can happen from it being called multiple times. I
figure it's doing so because a number of events are internally firing which
are each causing the Dispose method to be called...better to be safe than
sorry.
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/index.aspx - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Sharon" <ta*******@void.null> wrote in message
news:O4**************@TK2MSFTNGP15.phx.gbl...
Hi.
I put a message box in the form designer, Dispose method.
Clicking the form close (X) button, i noticed that the message,
appears twice.
My code does not call Dispose.
What is happening here?
Thanks.
Sharon.