Re: Pop up form on closing
Why don't you disable the cose_event when the procedure is still running, or create a messagebox when trying to close the form? Think that would be the best/most easy solution.
Re: Pop up form on closing
Untested:
vb.net Code:
Private f As Form
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Call New Thread(AddressOf ShowF).Start()
End Sub
Private Sub Form1_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
f.Invoke(New MethodInvoker(AddressOf f.Close))
End Sub
Private Sub ShowF()
Me.f = New Form
f.Show()
End Sub
It would be more appropriate to use the application's Shutdown event than the form's FormClosed event but you get the idea. Very easy so maybe having a go yourself would have been worth a try.