J
John Bowman
Hi,
I need some dialog handling help, I must be missing something obvious here
but I can't figure out the solution to the following problem...
Simple Win Forms app that has button on the form. The click event handler
for the button creates another dialog (as a form object) and calls it's
ShowDialog method to dsiplay it modally. The secondary dialog then appears
that has OK and Cancel buttons and the user can interact as expected. Now
when the user chooses OK some settings need to be recorded to disk, so I
trap the possible exceptions and dutifully show a MessageBox when needed
informing them what went wrong. The problem is that once the exception has
been handled and the error MessageBox dimissed, the secondary dialog also
disappears. I want it to stay open until they can either store everything
correctly or choose Cancel. Basically, I need to abort the OK click event
handler prematurely so the secondary dialog stays open. How do I do that?
TIA,
I need some dialog handling help, I must be missing something obvious here
but I can't figure out the solution to the following problem...
Simple Win Forms app that has button on the form. The click event handler
for the button creates another dialog (as a form object) and calls it's
ShowDialog method to dsiplay it modally. The secondary dialog then appears
that has OK and Cancel buttons and the user can interact as expected. Now
when the user chooses OK some settings need to be recorded to disk, so I
trap the possible exceptions and dutifully show a MessageBox when needed
informing them what went wrong. The problem is that once the exception has
been handled and the error MessageBox dimissed, the secondary dialog also
disappears. I want it to stay open until they can either store everything
correctly or choose Cancel. Basically, I need to abort the OK click event
handler prematurely so the secondary dialog stays open. How do I do that?
TIA,