I have button on form2. i want when user click this button make something and after that call form1.button click event how can i do that?
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.
Make the event handler in Form1 public and call that Form1.button_click handler directly. You may give dummy parameters (this, null) if you do not use those in the handler.
Consider rethinking your design. At best, your event handlers should only call some functions of another layer, which actually “does something”. That functions you may just as well utilize from form1 or from form2 or from everywhere.