Dear
I am opening a form a menu click
private void newToolStripMenuItem_Click(object sender, EventArgs e)
{
Form frm = new Form();
frm.StartPosition = FormStartPosition.CenterScreen;
frm.MdiParent = this;
frm.Show();
}
The form is opening fine But I have a question.
When i passes through these statesments after frm.show() the object "frm" must be die,But form does not clse it self, how it is done,
I mean i want to know,if i am out the brases means object does not exists but it's form exists how it is happning,
Please correct me .
Why form does not die evn object has been destroyed
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Gomathi PalaniswamyRank #714 · 3.3K reputationPosted Nov 12, 2010, 1:38 AM EST
It's like a method..for example we have class like
public main()
{
Button l6 = new Button();
l6.Location = new Point(915, 350);
l6.Text = "Exit";
this.Controls.Add(l6);
l6.Click += new EventHandler(l6_Click);
l6.Text = "Road Network";
}
in above example the button has been created and it executes l6_Click method after the execution of that event the l6 button text can be changed as "Road Network".It's applicable for your above code frm.show();
Sam HobbsRank #107 · 20.5K reputationPosted Nov 13, 2010, 5:54 PM EST