Click here to Skip to main content
15,915,163 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I was able to link the next form with a current form. But when i tried linking a previous form with the current form then i was not able to do it.
Is it not possible to go back to an already visited form again?

I have four windows forms- Form1, Form2, Form3, Result.

In Form1, I give the code Form2.Show() after the click of a button. The code works fine.
In Form2, I gave the code Form3.Show() after the clock of a button. This too works fine.
In Form3, I gave an If condition:
VB
If button1.Click() Then
               Result.Show()
           ElseIf button2.Click() Then
               Form1.Show()
           EndIf
When I click the button1 on Form 3, it navigates to Result Form. However when I click button2 the control remains on Form3 and does not navigate to Form1.

How do i rectify this problem? How do i navigate to a previous form by the click of button?
Posted
Updated 6-Jan-16 18:47pm
v3
Comments
OriginalGriff 6-Jan-16 4:15am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Use the "Improve question" widget to edit your question and provide better information.
dan!sh 7-Jan-16 0:52am    
Are you looking for a wizard like functionality?
Member 12247039 7-Jan-16 2:01am    
I am totally new to programming. Ya you can say like a wizard.
dan!sh 7-Jan-16 3:46am    
Take a look here: http://stackoverflow.com/questions/27902072/c-sharp-multiple-guis-with-one-window-in-window-form/27903591#27903591
Member 12247039 7-Jan-16 4:11am    
Is it same for vb.net?

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