N
Nigel V Thomas
I'm having issues with form.DialogResult - here's what I am trying to do:
I have a form with 3 exit points:
1. OK Button (sets DialogResult to .OK)
2. Cancel Button (sets DialogResult to .Cancel)
3. Form close button which queries user (in the Form_FormClosing event) if
changes have been made (MsgBox and Yes/No/Cancel buttons.) where...
Selecting Yes sets DialogResult to .OK
Selecting No sets DialogResult to .Cancel
Selecting Cancel cancels the unloading of the form
Here's the issue:
The OK and Cancel buttons work fine, however, if I Close the form and select
Cancel (thus cancelling the FormClose event) and then subsequently hit the OK
or Cancel button, I get a different CloseReason (3) in the FormClosing Event
Can anyone suggest a reason, or should I be closing the form a different way?
Nigel
I have a form with 3 exit points:
1. OK Button (sets DialogResult to .OK)
2. Cancel Button (sets DialogResult to .Cancel)
3. Form close button which queries user (in the Form_FormClosing event) if
changes have been made (MsgBox and Yes/No/Cancel buttons.) where...
Selecting Yes sets DialogResult to .OK
Selecting No sets DialogResult to .Cancel
Selecting Cancel cancels the unloading of the form
Here's the issue:
The OK and Cancel buttons work fine, however, if I Close the form and select
Cancel (thus cancelling the FormClose event) and then subsequently hit the OK
or Cancel button, I get a different CloseReason (3) in the FormClosing Event
Can anyone suggest a reason, or should I be closing the form a different way?
Nigel