日期:2014-05-18 浏览次数:21308 次
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
//点击上一步的时候
private void button2_Click(object sender, EventArgs e)
{
show();
}
//窗体加载的时候(默认为第一个页面,即上一步的页面,注意这里是只有两个页面,多个时请根据情况来)
private void Form1_Load(object sender, EventArgs e)
{
show();
}
public void show()
{
//设置窗体名称
Form1 form = new Form1();
form.Text = "上一步页面";
//上一步的页面显现
this.panel1.Visible = true;
//下一步的页面隐藏
this.panel2.Visible = false;
}
//点击下一步的时候
private void button1_Click(object sender, EventArgs e)
{
this.panel2.Visible = true;
this.panel1.Visible = false;
//设置窗体名称
Form1 form = new Form1();
form.Text = "下一步页面";
}
}
}