Effect description:
There are three forms and the order is
(1) Click the button in the first form to pop up the second form, hide the first form
(2) The third form pops up when the second form reaches a certain time
(3) Click the button of the third form to close the third and second forms, and the first form will pop up
From1
Copy the codeThe code is as follows:
using System;
using ;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Open form2 and hide form1_Click(object sender, EventArgs e)
{
Form2 f = new Form2();
= this;
();
();
}
}
}
Form2
Copy the codeThe code is as follows:
using System;
using ;
namespace WindowsFormsApplication1
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
public Form1 fatherForm;
private void Open from3_Click(object sender, EventArgs e)
{
Form3 f = new Form3();
= this;
();
}
}
}
Form3
Copy the codeThe code is as follows:
using System;
using ;
namespace WindowsFormsApplication1
{
public partial class Form3 : Form
{
public Form3()
{
InitializeComponent();
}
public Form2 fatherForm;
private void Close form3from2 display from1_Click(object sender, EventArgs e)
{
();
();
();
}
}
}