vs.net 2003 missing Form.Name property

  • Thread starter Thread starter Kun
  • Start date Start date
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
 
Well , it didn't happen to me, BTW the Name property is not so useful
anyway, event if it is then you could then write your own after the
InitializeComponents() in constructor
 
Back
Top