I have a button click event handler which says this.Close()
In the FormClosing event I detect unsaved changes and say "Do you want to Save?"
If they say Yes I set e.Cancel = true and then call my Save method. If the data is saved ok in my Save method at the end I say this.Close() but the form stays open.
This seems such a simple idea but I can't work it out.
Do I need to create new thread in FormClosing so if they say Yes set e.Cancel = true and create a new thread to do the Save which will then call the this.Close()