namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
private Form frm;
public Form1(Form frm)
{
InitializeComponent();
this.frm = frm;
}
private void button1_Click(object sender, EventArgs e)
{
frm.Show();
this.Hide();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
}
}
namespace WindowsFormsApplication1
{
public partial class Form2 : Form
{
private Form frm;
public Form2()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (frm == null)
{
frm = new Form1(this);
}
frm.Show();
this.Hide();
}
}
}
窗体调用2.0
最新推荐文章于 2022-07-24 16:40:08 发布