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 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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

19th Aug 2022, 8:25 AM
Om Yele
Om Yele - avatar
3 Answers
+ 1
Thankyou . But even they don't know the answer
19th Aug 2022, 12:25 PM
Om Yele
Om Yele - avatar
0
No code is correct but don't know why it ask user 3-4 times to click on "yes" to exit from application
19th Aug 2022, 11:20 AM
Om Yele
Om Yele - avatar
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.
19th Aug 2022, 6:50 PM
Brian
Brian - avatar