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 .
Loading
Sam HobbsPosted Nov 13, 2010, 10:54 PM
Gomathi PalaniswamyPosted Nov 12, 2010, 6:38 AM
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();