Code in Form1.cs: In which, I hid Form1.cs then showed Form2.cs
private void Form1_Load(object sender, EventArgs e)
{
this.Hide();
Form2 f2 = new Form2();
f2.Show();
}
Code in Form2.cs: In which, I hid Form2.cs and tried to show Form1.cs again then the Error creating window handle appeared on runtime.
private void Form2_Load(object sender, EventArgs e)
{
this.Hide();
Form1 f1 = new Form1();
f1.Show();
}
Aucun commentaire:
Enregistrer un commentaire