M
Mr. X.
Hello.
I have an inherited windows-form class : MyForm.
When I put component on it - I see many code behind (and when I do on a
original windows form, I don't get an automatic code behind).
Form is declared :
Public Class MyForm
Inherits Form
Public Sub New()
MyClass.New(Nothing)
End Sub
Public Sub New(ByRef dt As DataTable)
MyBase.New()
...
End Sub
End Class
When I do another form like this (It is declared as a class) :
Public Class frmTest
Inherits MyForm
....
When I just put a button on the form I get a auto-generated source on the
code :
Friend WithEvents Button1 As System.Windows.Forms.Button
Private Sub InitializeComponent()
Me.Button1 = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(506, 83)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(67, 58)
Me.Button1.TabIndex = 0
Me.Button1.Text = "Button1"
Me.Button1.UseVisualStyleBackColor = True
'
'frmTest
'
Me.ClientSize = New System.Drawing.Size(744, 218)
Me.Controls.Add(Me.Button1)
Me.Name = "frmTest"
Me.ResumeLayout(False)
End Sub
Why I getting that automatic code, and how can I avid getting the
auto-generated code behind (or see it elsewhere) ?
Thanks
I have an inherited windows-form class : MyForm.
When I put component on it - I see many code behind (and when I do on a
original windows form, I don't get an automatic code behind).
Form is declared :
Public Class MyForm
Inherits Form
Public Sub New()
MyClass.New(Nothing)
End Sub
Public Sub New(ByRef dt As DataTable)
MyBase.New()
...
End Sub
End Class
When I do another form like this (It is declared as a class) :
Public Class frmTest
Inherits MyForm
....
When I just put a button on the form I get a auto-generated source on the
code :
Friend WithEvents Button1 As System.Windows.Forms.Button
Private Sub InitializeComponent()
Me.Button1 = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(506, 83)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(67, 58)
Me.Button1.TabIndex = 0
Me.Button1.Text = "Button1"
Me.Button1.UseVisualStyleBackColor = True
'
'frmTest
'
Me.ClientSize = New System.Drawing.Size(744, 218)
Me.Controls.Add(Me.Button1)
Me.Name = "frmTest"
Me.ResumeLayout(False)
End Sub
Why I getting that automatic code, and how can I avid getting the
auto-generated code behind (or see it elsewhere) ?
Thanks