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();
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
EhteshamPosted May 23, 2012, 6:46 AM
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
VulpesPosted May 23, 2012, 10:43 AM
Here's one way to do it:
Camila PiaiPosted May 23, 2012, 10:34 AM