Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Closed event not fired when form hidden.

Status
Not open for further replies.

GlynA

Programmer
May 1, 2002
77
GB
I have a problem in a VB.NET application where the Closed event is not fired when I used the Close method on a form which has previously been hidden. Simply showing the form again before closing it makes no difference. The form is an MDI parent - I do not know if that is significant.
Also, I notice that if I show the form again after hiding it then the close gadget does not work.

Has anyone seen this problem or have any ideas how to address it?
 
Glyn,

I have seen this happening even with forms which are not MDI. And as a work around I started using the event OnHandleDestroyed which is guaranteed to fire when you close out of a window.
 
Thanks for the suggestion Kris,

I have now changed the application to close the form rather than hiding it. This resolves both the problem with the close gadget and the lack of the closed event.

I would still be interested to hear if anyone else has come across these problems.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top