3
Answers

this.Close(),this.Disopse() in C sharp

Gururaj Shinde

Gururaj Shinde

15y
7.6k
1
Hi,..
Respected Sir,
I am a programming student.I want some help on c# windows application related to this.Close(),this.Dispose() on the following...
 
//In windows application, on Form1-- Button1_Click(-----) i write code
Private void Button1_Click(---,-----)
{
this.Close();
this.Dispose();
Form2 frm=new Form2();
frm.ShowDialog();
}
// to show Form2,but it does not works.. ! I want to close and dispose Form1 while at the same time want to show Form2 .
when i click the button on form1, the whole application get closed.
So please help me to solve this..
 
Waiting For your  reply..
 
 
Thanks
--
Gururaj
Answers (3)