0

I have three form form1, form2, form3. in form one a button opens form3. and in form2 also a button for opening the same form as form3. Is it possible and how? becoz when i was simply chen this code for open form this form this was not working.
there was error "best overload method match for form3.

3
Contributors
8
Replies
9
Views
6 Years
Discussion Span
Last Post by vivekagrawal
0

You can click the following code as many times as your computer memory will allow it.
You will have as many forms.

private void button1_Click(object sender, EventArgs e)
        {
            Form f = new Form();
            f.Show();
        }
0

i have use this but the error is does not contain a constructor that takes 0 argument. this error is in both form 1 and form 2.

0

Maybe you have any parameter(s) in the constructor on form3 (form2). If you have it, and you dont need to pass any from form1 you do:

Form3 f3 = new Form3(null);
f3.Show();
0

This is working but i want fill some data from form 3 to form1 and form2 then error is coming
does not contain a constructor that takes 1 argument

0

Did you see my example I did it for you? Thats the example you hav to follow.
You know, when you selected a doctor in the dataGridView, and the his name and Id is passed from that form to the main one (so backwards).
Check ans study that example. The answer lays there.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.