i'm working on a WordProcessor.
I want the form to ask the user whether or not he wants to save his work after the user has pressed the 'x'(dispose) button and killed the form.
I have an event_handler property in my class that displays the RichTextBox and that event is called whenever the RichTextBox is disposed.
the messagebox asking the user "do you want to save your work" & the "SaveFileDialog" (I tried both these separately) are not treated like the .ShowDialog() forms that they are and do not wait for a user response.
is there a way to catch the program flow when the user clicks the 'x'(dispose) button BUT before the app actually starts disposing everything?