How to swap between forms in windows forms application

Hi there.

I am working on a project. Its a shopping mall software, and i am working with windows forms application. I wanna know how to swap between multiple forms.
there are two forms. form1 ( which is main form when the application run) and form2. how to swap between these forms. i can jump to form2 but how to hide form1 and again show it when use clicks on back button that is on form2.

Thanks;
form1.hide();
Thanks for the reply...
I can hide the main form that is form1, but cannot show it again by using form2. the compiler gives error when i include #include "Form1"
closed account (G309216C)
Hi Bilal,

I have had a similar problem before, I have created a code for you to use to show a "Form2".

Code Snippet:
1
2
3
this.hide();
Form2  fs = new Form2();
fs.ShowDialog();

A YouTube Link which answers your Question:
https://www.youtube.com/watch?v=LWoE7P4RHFM
Hope you found my post useful.

*NOTE*:
Kind Regards
Topic archived. No new replies allowed.