my program prompts the user " Do you want to exit program?", which works fine except that it prompts when windows is closing. how do i test for windows closing to allow my program to exit without prompting. ( use to do it in query unload )
Printable View
my program prompts the user " Do you want to exit program?", which works fine except that it prompts when windows is closing. how do i test for windows closing to allow my program to exit without prompting. ( use to do it in query unload )
Set a flag in the explicit window close. Check the flag in QueryUnload....
you're thinking of vb6. this is net. there is no query unload. thanks anyway.
"Closing" is the event which is running when form is closing.
Using the event arg e you can set e.Cancel = True
if you wish to cancel closing.
thats not what i asked, i know how to use the e.cancel, what i want to know is how to test to see if my program is closing because the operating system is closing.
Check this thread
http://www.gotdotnet.com/Community/M....aspx?id=40651
that was exactly what i wanted. thanks.