i am creating a replica of my current form:
Form form2 = new Form1();
form2.Show();
i need to be able to run events on form2 like the button_click and fill out some text in a textbox. how do i do this?
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.
Best way to edit the controls on a form is to create a method that exposes this feature (like an EditTextBox1(string) kind of method).
In general, when you want to manipulate a form from code (except for the form’s code) and not the gui, it’s wise to create a method for this (in the form class).
Regarding running events, it’s unclear what you mean