Click here to Skip to main content
15,884,836 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
hi friends,
i am developing a small windows application. In that i am redirect from one form to another form.......
how can i redirect from one form to another form in C#.net
Posted

Use the following code to navigate from one form to another.
Form2 obj1 = new Form2();
obj1.Show();
this.Hide();

For more details visit:Navigating from one form to another
 
Share this answer
 
v3
this.Hide();
Form2 f2 = new Form2;
f2.Show();
 
Share this answer
 
v2
Comments
Toniyo Jackson 21-Apr-11 5:17am    
Added pre tag
kittytaneja 26-Nov-13 5:17am    
sir i want oneForm automatically timeout and redirect to loginForm... but little bit change that is i want to give specific time suppose 20 min. same i ill give but if i ill touch my mouse than timer should be start from starting(means 0) and if i ill not touch my mouse last 20 min it will automatically come back to login page please help me for that and provide me code for only windows forms in .net applicatioin
honey4bee 29-Jul-11 3:49am    
its working............
Close the current form - this.Close(),
Create object for another form and call formObject.Show() method.

[Edit]
sree 2010 wrote:
please give me one example to navigate from one form to another

Try this![^]

[/Edit]
 
Share this answer
 
v2
Comments
sree 2010 24-May-10 2:13am    
please give me one example to navigate from one form to another
sree 2010 24-May-10 2:20am    
thank you
Prasanta_Prince 21-Apr-11 5:39am    
Good Solution.
Ankur\m/ 21-Apr-11 5:49am    
Saying good solution doesn't help anyone. You should vote up a good solution so that the future users find the answer fast and easy.
Member 11572517 22-Aug-16 1:09am    
very useful solution thanks, and buddy please rate it.

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