ok, this is a great function to prevent people from closing the app, but what do I do when I need to close the app without the users input i.e. not showing the dialog confirmation?
I just keep running into problems this weekend!
thanks in advance.
Code:
--This code asks user to "BE sure that they want to exit" function QueryAllowProjectClose() --this function will be called when the program is exiting if close_value then Application.Exit(0); else confirmation = Dialog.Message("NOTICE", "WARNING! \r\ If you close this license manager you will not be able to run Credit Mechanic software.\r\Are you sure you want to Exit?", MB_YESNO, MB_ICONEXCLAMATION, MB_DEFBUTTON1); if confirmation == 6 then -- The yes button was pressed, allow program to close (return true) return true; else -- The yes button was NOT pressed, do NOT allow the program to close (Return false) return false; end end end
thanks in advance.
Comment