+ 1
Vb.net Help plz - Beginner - I don't know why when popup comes i click it ask me to click 3 times then it gets close
I don't know why when popup comes i click it ask me to click 3 times then it gets close Private Sub Form3_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing Dim choice1 As DialogResult choice1 = MessageBox.Show("Are you sure want to exit", "Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Question) If (choice1 = DialogResult.No) Then e.Cancel = True Else Application.Exit() End If End Sub
3 ответов
+ 1
Thankyou . But even they don't know the answer
0
No code is correct but don't know why it ask user 3-4 times to click on "yes" to exit from application
0
Run it in debug. Add a breakpoint on the first line of your FormClosing event code. Check the Stack Trace window to see from where it is getting called each time.