Hi I am a new programmer and i just wannna know that why can't we close an hide our VC# form with the help of following code -
private void button1_Click(object sender, EventArgs e)
{
Form1 frmobj = new Form1();
frmobj.Close();
frmobj.Hide();
}
We can do the same thing with the help of following code-
private void button1_Click(object sender, EventArgs e)
{
this.Close();
this.Hide();
}
Please tell me why can't we close and Hide the current form with the help of new instance of Form1.