How can I implement Apply button action in a Windows Forms dialog with C#?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Windows Forms doesn’t make it particularly easy unless it is the dialog itself that takes care of the side-effects. Which isn’t always common, it is usually done in the form that calls ShowDialog(), based on the return value.
No biggie though, add your own event to the form:
And the code in your main form could then look like this: