Questiob about the X (closing event) of the form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hello,

i want that when i press the red X of the form a messageBox will ask if i want to quit or not (that i know how to do), the problem is that no metter what i choose that from closes. how i can prevent the form to be closed when i choose the no option?

thanks
 
Gidi said:
i want that when i press the red X of the form a messageBox will ask
if i want to quit or not (that i know how to do), the problem is that
no metter what i choose that from closes. how i can prevent the form
to be closed when i choose the no option?

When you've shown the message box, if the result is no, set the Handled
property of the closing event to true.
 
Back
Top