Dont set the DialogResult property on the button, set it on the form, then
as I said, close or hide the form.
"Sarah" <(E-Mail Removed)> wrote in message
news:xn66b.75207$(E-Mail Removed)...
>
> >
> > Whenever I change the dialogresult property it does change right away.
> >
> >
> This is my scenerio:
>
> - I launch a dialog box (form 2) from form 1 using "Dialog_AddName_Results
=
> CustomerName.ShowDialog()"
> - On the dialog box, the "Add" button "DialogResult" property is set to
> "None" by default
> - On the "Add" button click event, some code evaluates to true or false
> - If the above code evaluates to true, it sets "DialogResult" to OK (1)
>
> The thing is, the dialog box does not close up right away - as when the
> "Add" button was first pressed, the "DialogResult" was set to "None"
>
> Hope that gets you to the point where I am. Is there an event that I can
run
> before the click event of the button that will run when the button is
> clicked?
>
>
|