i need to be able to set a confirmation message asking if the user is sure thwey wish to exit my application, cant this be done?
Professional Software Development Tools
i need to be able to set a confirmation message asking if the user is sure thwey wish to exit my application, cant this be done?
Yes, explanation is available in manual for that.
It's one of the built-in functions and you define it in the global functions.
(I'm not at home so I can't give you detailed info...)
Never know what life is gonna throw at you.
(Based on a true story.)
do a search.. i know its already been done with an example posted
i did do a search but i didnt find anything???
hmmm.... I did a search with these words: confirm exit
here is the second hit:
http://www.indigorose.com/forums/sho...t=confirm+exit
Maybe should Tigg do a little Flash tutorial about search functionality...![]()
Never know what life is gonna throw at you.
(Based on a true story.)
if e_ID == 300 then
Pexit = Dialog.Message("Exit ?", "Do you wish to Exit ?", MB_YESNO, MB_ICONQUESTION);
if Pexit == IDYES then
Application.Exit(); end
end
I normally use the above code from a menu option.
I hope this helps.
Last edited by holtgrewe; 11-22-2006 at 04:54 PM.
will these work when you press a button ? as i cant get it working .
If you put this code (from Worms' link) in the Global Functions, it will ask to confirm exit no matter how you exit, from a button, a menu, by clicking the X etc.
The neat thing about this is you can have an exit button on every poage for example but you need this one pioece of code.Code:function QueryAllowProjectClose() result = Dialog.Message("Exit Application?", "Would you like to exit the application?", MB_YESNO, MB_ICONEXCLAMATION, MB_DEFBUTTON1); --the no button was pressed if result == 7 then --cancel exit return false; else --allow exit return true; end end
Dermot
I am so out of here
ok i will try again,
nope still not working for me :(
i have tried using it on a button ( this button exits the program ) but nothing happens, i have tried for hours and hours, please help![]()
Try this scripting in the On Click option on the button:
Pexit = Dialog.Message("Exit ?", "Do you wish to Exit ?", MB_YESNO, MB_ICONQUESTION);
if Pexit == IDYES then
Application.Exit();
end
Dermot's example should work globally for you, whenever you call his function.
My attached example will not work globally for you as is, and would need to be coded for each button or image in your project for 'exiting'.
I hope this works for you.
Last edited by holtgrewe; 11-24-2006 at 12:14 PM. Reason: typo
thank you this worked really well.