我已经彻底研究过,但我仍然找不到最好的解决方案。我有一个 3 个按钮,返回 - 主页 - 前进 ..
这就像浏览器左上角的按钮.. 我试图在表单上执行此操作..
我有的是这个..
后退按钮代码是
private void button1_Click(object sender, EventArgs e)
{
this.Hide();
}
// simply hiding the form .. so that the previous form will be shown..
主页按钮代码是这个..
private void button2_Click(object sender, EventArgs e)
{
for (int i = Application.OpenForms.Count - 1; i >= 0; i--)
{
if (Application.OpenForms[i].Name != "HomePage")
Application.OpenForms[i].Close();
}
}
// this will show the HomePage form and close other forms whos name is not "HomePage"
问题是当我按下后退按钮时,我隐藏它..按钮如何重新打开以前关闭或隐藏的表单?
我希望你能帮帮我!谢谢!
private void button3_Click(object sender, EventArgs e)
{
???????
}