如何重定向到windows中的第二页,c# [英] How to redirect to second page in windows, c#
本文介绍了如何重定向到windows中的第二页,c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在创建Windows应用程序。我有一些表格。我想从第一个表单导航到第二个表单。我已经设计了两种形式。你能不能给我一个从第一种形式转到第二种形式的想法?
谢谢......
Hi,
I am creating me windows application. Here I have some forms. I want to navigate to the the second form from first form. I already designed both forms. Could you please give me the idea to move from first form to second?
Thank you...
推荐答案
关闭当前表格 -this.Close()
,
为另一个表单创建对象并调用formObject.Show()
方法。
像这样:
Close the current form -this.Close()
,
Create object for another form and callformObject.Show()
method.
Like this:
private void button1_Click_1(object sender, EventArgs e)
{
Form2 obj = new Form2();
if (obj == null)
{
obj.Parent = this;
}
obj.Show();
this.Hide();
}
..还要尝试这里 [ ^ ]
和示例从一种形式导航到另一种形式 [ ^ ]
Hello Neha,
请查看以下链接:
从一个表单重定向到另一个表单 [ ^ ]
Hello Neha,
Please have a look at following links:
Redirect from one form to another form[^]
这篇关于如何重定向到windows中的第二页,c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文