crazymarvin
Member
How would you get a yes/no message box to appear when the red 'X' was clicked on the toolbar. I asumed it would work the same as if you were putting the code behind a button only with a different event. however i can not get it so that the form wont close when the no button is clicked
This is what i had thought of:
This is what i had thought of:
VB.NET:
Private Sub frmPIN_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
If MessageBox.Show("Are you sure you want to quit?", "Exit", _
MessageBoxButtons.YesNo, MessageBoxIcon.Question) = MsgBoxResult.Yes Then Me.Close()
End Sub