K
Kun
Hi there,
I think vs.net missing default name for new form.
Scenario:
1. I create new Window Application
by default it give me Form1
2. I add Form2
3. In Form1_Load event I try to get form2 name what I get is empty string
not Form2
---- solution: I went into Form2
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.Size = new System.Drawing.Size(300,300);
this.Name = "Form2"; // this line is missing
this.Text = "Form2";
}
They should add it to default new form this.Name = "Form2";
Cheers,
Kun
I think vs.net missing default name for new form.
Scenario:
1. I create new Window Application
by default it give me Form1
2. I add Form2
3. In Form1_Load event I try to get form2 name what I get is empty string
not Form2
---- solution: I went into Form2
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.Size = new System.Drawing.Size(300,300);
this.Name = "Form2"; // this line is missing
this.Text = "Form2";
}
They should add it to default new form this.Name = "Form2";
Cheers,
Kun