Is there documentation of what we should not change in the Initialize
Component of a Windows form?
For example, the following code was generated by VB .NET:
Me.AutoScaleBas eSize = New System.Drawing. Size(5, 13)
Me.ClientSize = New System.Drawing. Size(242, 223)
Me.Controls.Add Range(New System.Windows. Forms.Control() {Me.btnGreeting ,
Me.txtName, Me.lblInstructi on})
Me.Menu = Me.OptionMenu
Me.Name = "frmHello"
Me.Text = "Hello"
Me.ResumeLayout (False)
I then changed the code to:
With Me
.AutoScaleBaseS ize = New System.Drawing. Size(5, 13)
.ClientSize = New System.Drawing. Size(242, 223)
.Controls.AddRa nge(New System.Windows. Forms.Control() _
{.btnGreeting, .txtName, .lblInstruction })
.Menu = .OptionMenu
.Name = "frmHello"
.Text = "Hello"
.ResumeLayout(F alse)
End With
This change caused the controls to vanish in designer view, but the code
still ran correctly.
Where can I find more info on what we can do with code in the Initialize
Component?
--
http://www.standards.com/; See Howard Kaikow's web site.
Component of a Windows form?
For example, the following code was generated by VB .NET:
Me.AutoScaleBas eSize = New System.Drawing. Size(5, 13)
Me.ClientSize = New System.Drawing. Size(242, 223)
Me.Controls.Add Range(New System.Windows. Forms.Control() {Me.btnGreeting ,
Me.txtName, Me.lblInstructi on})
Me.Menu = Me.OptionMenu
Me.Name = "frmHello"
Me.Text = "Hello"
Me.ResumeLayout (False)
I then changed the code to:
With Me
.AutoScaleBaseS ize = New System.Drawing. Size(5, 13)
.ClientSize = New System.Drawing. Size(242, 223)
.Controls.AddRa nge(New System.Windows. Forms.Control() _
{.btnGreeting, .txtName, .lblInstruction })
.Menu = .OptionMenu
.Name = "frmHello"
.Text = "Hello"
.ResumeLayout(F alse)
End With
This change caused the controls to vanish in designer view, but the code
still ran correctly.
Where can I find more info on what we can do with code in the Initialize
Component?
--
http://www.standards.com/; See Howard Kaikow's web site.
Comment