J
Jim Heavey
Hello, I am trying to create my own little dialog box. Prior to returning, I
want to ensure the information keyed in my dialog box is correct. If not
correct, then the user must correct or cancel out of the dialog box.
I set the "Cancel" button "DialogResult" property to cancel. The other button
I set the DialogResult property to OK, BUT ONLY AFTER IT PASSES THE
VALIDATION. Evidently this property has to be set prior to the button being
clicked and if set within the button click event then requires the button to
be clicked again.
I thought I would create a hidden button and set it DialogResult Property to
"OK" and then raise the event within the other buttons click event after I
determined that all the edits had been passed. When I enter the "RasieEvent
cmdExit.Click (sender, e)" the editor does not like it and says cmdExit is not
an event within the class.
So can I not raise another buttons click event?
Is there a better technique for doing this?
Thanks in advance for your assistance!!!!!!!!!!
want to ensure the information keyed in my dialog box is correct. If not
correct, then the user must correct or cancel out of the dialog box.
I set the "Cancel" button "DialogResult" property to cancel. The other button
I set the DialogResult property to OK, BUT ONLY AFTER IT PASSES THE
VALIDATION. Evidently this property has to be set prior to the button being
clicked and if set within the button click event then requires the button to
be clicked again.
I thought I would create a hidden button and set it DialogResult Property to
"OK" and then raise the event within the other buttons click event after I
determined that all the edits had been passed. When I enter the "RasieEvent
cmdExit.Click (sender, e)" the editor does not like it and says cmdExit is not
an event within the class.
So can I not raise another buttons click event?
Is there a better technique for doing this?
Thanks in advance for your assistance!!!!!!!!!!