Jul 3, 2002 #1 CookieNZ MIS Apr 22, 2002 48 NZ Why does this code never quit the application? Dim result As DialogResult MsgBox("Are you sure you wish to quit the application?", MsgBoxStyle.YesNo) If result = DialogResult.Yes Then End Else Exit Sub End If
Why does this code never quit the application? Dim result As DialogResult MsgBox("Are you sure you wish to quit the application?", MsgBoxStyle.YesNo) If result = DialogResult.Yes Then End Else Exit Sub End If
Jul 4, 2002 #2 soldieryap Programmer Aug 15, 2000 59 MY coz your "result" is never store any data!! TRY: result = MsgBox("Are you sure you wish to quit the application?", MsgBoxStyle.YesNo) . . . OR If MsgBox("Are you sure you wish to quit the application?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then End End If *p/s: MSDN will help Upvote 0 Downvote
coz your "result" is never store any data!! TRY: result = MsgBox("Are you sure you wish to quit the application?", MsgBoxStyle.YesNo) . . . OR If MsgBox("Are you sure you wish to quit the application?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then End End If *p/s: MSDN will help
Jul 5, 2002 #3 krisbrixon Programmer May 10, 2002 371 US you may also what to look into: Application.Exit() instead of End I do not know the difference, but all the examples in MSDN shows Application.Exit() to exit an application. Upvote 0 Downvote
you may also what to look into: Application.Exit() instead of End I do not know the difference, but all the examples in MSDN shows Application.Exit() to exit an application.