A Windows Forms form does not have the event Unload, like VB6. What one acts like?
Windows Forms - .Net 8.0
Collapse
X
-
In my experience, Windows Forms doesn’t have the Unload event like VB6. Instead, I use the FormClosing or FormClosed events depending on what I need. FormClosing fires before the form actually closes, letting me cancel the close or do cleanup, while FormClosed happens after the form is gone, useful for finalizing resources. I often rely on FormClosing because it closely mimics VB6’s Unload behavior.
https://www.abtosoftwar e.com/expertise/vb6-migration -
You are right, Windows Forms does not have the old VB6 unload event. The closest equivalent is the form.closing or form.formclosin g event.Comment
Comment