Torna al Thread
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Dim res As DialogResult = MessageBox.Show("Vuoi salvare il file?", "", MessageBoxButtons.YesNoCancel)
If res = Windows.Forms.DialogResult.Cancel Then
e.Cancel = True
ElseIf res = Windows.Forms.DialogResult.Yes Then
' Procedura di salvataggio del file.....
End If
End Sub