Guys

I have 2 forms and I have a button that when I click have to open another form
but I dont know how to do that, I have google searched it but I ended having hilarious syntax errors, anyone guys know the code to open a new form from the existing one
please help me

Something like:

Form2 *second_form = new Form2;
second_form->Show();

Change "Form2" to the name of your second form.

Ok Now I wana do the same to the 2nd form, that is, if I click to the button it has to take me back to the 1st form so the problem is when I try the above code to the 2nd form it gives me errors

how about :

this->Visible = false;

in the second form?

This will make the form invisible. It's still there, but you can't see it. Any values stored in the form will be kept.

Ok Thanx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.