by Gehan Fernando. (13 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB.NET
Difficulty: Unknown Difficulty
Originally Published: Mon 17th September 2007
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Set Message Box On FormClosing Event ....
Dim _msgresult As DialogResult
_msgresult = MessageBox.Show("Do You Want To Close This Form ?", "Close Form", MessageBoxButtons.YesNo, MessageBoxIcon.Information)
If _msgresult = Windows.Forms.DialogResult.Yes Then
e.Cancel = False
Else
e.Cancel = True
End If
End Sub