T
Trapulo
I need to release some resourse when user closes a form. I tried with this
code:
Private Sub frmSimple_Closing(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
But when I close the form, it disappears but this event is not fired.
I have an other problem related with this. My main routine opens the form
with this code:
Using frmSimple As New frmSimple
Application.Run(frmSimple)
End Using
After this code I need to make some other cleanup code. But the code is
never executed, and the application remains in memory.
What is it wrong?
thanks
code:
Private Sub frmSimple_Closing(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
But when I close the form, it disappears but this event is not fired.
I have an other problem related with this. My main routine opens the form
with this code:
Using frmSimple As New frmSimple
Application.Run(frmSimple)
End Using
After this code I need to make some other cleanup code. But the code is
never executed, and the application remains in memory.
What is it wrong?
thanks