Click here to Skip to main content
15,896,153 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
redirect of one windowform to another windowform
Posted
Comments
Jameel VM 5-Mar-13 2:05am    
Create an object of form you want to show. For example Form2 obj=new Form2(); obj.show();
Jibesh 5-Mar-13 3:20am    
your question is incomplete. provide which UI Library you are trying to do this.

Hi. If you working with WPF for creating windows application do like this:

C#
private void NavigateButton_Click(object sender, RoutedEventArgs e)
        {
            ViewWindow secondWindow = new ViewWindow();
            secondWindow.Show();
        }

ViewWindow is another Window. NavigateButton is located on current window(MainWindow).
i hope this help you.
good luck.
 
Share this answer
 
I'm assuming you just want to open a new form and close the current form.

C#
private void button_click(object sender,EventArgs e)
{
 new_Form  frmNew  = new new_From();
 this.Hide();
 
try
{
 frmNew.Show();
}
catch{}
}
 
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