Exit with confirmation
-
I need to ask for confirmation when finishing an app, how can I process the messages sent by any way of closing an application? ("Exit" in File Menu, the cross at top-right in the window, or even using task manager) Thank you.
-
I need to ask for confirmation when finishing an app, how can I process the messages sent by any way of closing an application? ("Exit" in File Menu, the cross at top-right in the window, or even using task manager) Thank you.
Override ( from memory ) OnClose and only call the base method if your confirmation dialog returns in the affirmative. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
It'd probably be fairly easy to make a bot that'd post random stupid VB questions, and nobody would probably ever notice - benjymous - 21-Jan-2003 -
Override ( from memory ) OnClose and only call the base method if your confirmation dialog returns in the affirmative. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
It'd probably be fairly easy to make a bot that'd post random stupid VB questions, and nobody would probably ever notice - benjymous - 21-Jan-2003 -
Hm. one question: how do you handle if application shuts down (user action) -or- windows shuts down? I mean, it isn't comfortable to show a dialog when system restarts.
Well, in that case, what *can* you do ? If your app needs to confirm shutdown, it should do so always. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
It'd probably be fairly easy to make a bot that'd post random stupid VB questions, and nobody would probably ever notice - benjymous - 21-Jan-2003 -
Well, in that case, what *can* you do ? If your app needs to confirm shutdown, it should do so always. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
It'd probably be fairly easy to make a bot that'd post random stupid VB questions, and nobody would probably ever notice - benjymous - 21-Jan-2003Ok, that works, I've override onclose, and it's ok. And what about killing the process from task manager, is it possible to do the same? Thanks a lot.
-
Ok, that works, I've override onclose, and it's ok. And what about killing the process from task manager, is it possible to do the same? Thanks a lot.
If a process is killed, you get no say in what happens at all, it is simply stopped. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
It'd probably be fairly easy to make a bot that'd post random stupid VB questions, and nobody would probably ever notice - benjymous - 21-Jan-2003