I am doing a dirty bit chk on my form when i click on cancel button and show a confirmation msg with ok and cancel button. I would like to perform the simialr action while i click on the ‘X’ button as well. Pls help
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to listen to
closeevent. Problem with it – your handler should return something immediately, and if you would present a question to a user it will be done asynchronously.So you need to send
falsefrom that handler, preventing form from closing. Present to user a message box, and if he accepts closing – call close method yourself and not do anything during this second close.