VB6. .
Toolbox (
button) . ,
, VB.NET (
) .
Form1.
vb.
5 , 30.
30
Form1.vb
, ,
Form1, (
class).
Inherits. , ,
Form.
(.
NET System namespaces); ,
System.
Windows.
Forms.
Form.
, (
public sub)
New.
InitializeComponent.
VS.
NET.
New Form_
Load VB6.
.
New sub Dispose sub,
Form_
Unload VB6.
, . 2.
Listing
2
Windows Form Designer
#Region " Windows Form Designer generated code
"
Public Sub New()
MyBase.New()
'This call
is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the
InitializeComponent() call
End Sub
'Form overrides
dispose to clean up the component list.
Public Overrides Sub
Dispose(ByVal disposing As Boolean)
MyBase.Dispose()
If
Not (components Is
Nothing) Then
components.Dispose()
End If
End Sub
Private
WithEvents button1 As System.Windows.Forms.Button
`Required by the Windows Form Designer
Private
components As System.ComponentModel.Container
`NOTE: The following procedure is required by the _
Windows
Form Designer
`It can be modified using the Windows Form Designer.
`Do not modify it using the code editor.
Private
Sub <System.Diagnostics.DebuggerStepThrough()> _
InitializeComponent()
Me.button1
= New System.Windows.Forms.Button()
Me.button1.Location
= New System.Drawing.Point(104, 72)
Me.button1.TabIndex
= 0
Me.button1.Text
= "button1"
Me.AutoScaleBaseSize
= New System.Drawing.Size(5, 13)
Me.ClientSize
= New System.Drawing.Size(292, 273)
Me.Controls.AddRange(New
System.Windows.Forms.Control() _
{Me.button1})
Me.Text
= "Form1"
End
Sub
#End
Region
31 Hello World .