I'm trying to call a method from another form, but it's not working.
Here's the code:
form1:
public void method1()
{
bla bla bla
}
form2:
form1 frm = new form1();
frm.method1();
Call a method from another method
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

EhteshamRank #3,979 · 374 reputationPosted May 23, 2012, 2:46 AM EDT
are you doing the below steps if yes then its wrong
1)form1 to from2
2)you are creating another instance of form1 in form2..
3)calling method from step2 form2 form instance
You should not create another form1 instance in step 2
Camila Piai7 reputationPosted May 23, 2012, 6:34 AM EDT
VulpesRank #55 · 29.2K reputationPosted May 23, 2012, 6:43 AM EDT
Here's one way to do it: