Forms, DialogResults & ControlBox

J

Josh Booth

Hi,
Is there a reason why if you have a Form with ControlBox = true to display
an ok button that when such a button is clicked the DialogResult in the
Closed event equals "None", how can you use the Ok button and internalize
the saving of data in a form??

Thanks
Josh
 
A

Alex Feinman [MVP]

Clicking OK button will set DialogResult returned by Form.ShowDialog

If you need to save form data with optional user confirmation, you can do it
in Closing event handler - ask user if he wants data saved and ask
accordingly
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top