Click here to Skip to main content
15,910,878 members
Please Sign up or sign in to vote.
3.00/5 (3 votes)
See more:
hi
Scenario:
i need to jump from form1 to form 2, form 2 to form 3.
and on previous click form 3 to form 1

What i did:
i create form2 new object on form 1 like
form2 objFrm2 = new form2;
this.hide()
objFrm2.show()


then form3 object on form2

and finally i need to move to from 1 so i create
form1 objFrm1 = new form1;
this.hide()
objFrm1.show()


What is problem:
code run fine. but each time i need to create new object of forms.
now finally i moved to form1 means my form2,form3 are hidden always

so how to overcome it ?

how can i close form, once navigate to another form

i will be grateful for solutions/suggestions
Posted

good post by SA here[^]
 
Share this answer
 
This is insane UI. If you must do this, create all your forms as controls, host them all on the one form, then change which one is visible. That way, you can show the same Form1 instance you started with.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900