how can i get the event of the click on the 'X' button??
I want to put an confirmation on the exit of the application!
Thank you,
Guilherme Costa
Printable View
how can i get the event of the click on the 'X' button??
I want to put an confirmation on the exit of the application!
Thank you,
Guilherme Costa
Form_Closing event .
Like this
VB Code:
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing If MessageBox.Show("Close this form ?", Nothing, MessageBoxButtons.YesNo) = DialogResult.Yes Then e.Cancel = False Else e.Cancel = True End If End Sub