?? form1.vb
字號:
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows 窗體設計器生成的代碼 "
Public Sub New()
MyBase.New()
'該調用是 Windows 窗體設計器所必需的。
InitializeComponent()
'在 InitializeComponent() 調用之后添加任何初始化
End Sub
'窗體重寫 dispose 以清理組件列表。
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Windows 窗體設計器所必需的
Private components As System.ComponentModel.IContainer
'注意: 以下過程是 Windows 窗體設計器所必需的
'可以使用 Windows 窗體設計器修改此過程。
'不要使用代碼編輯器修改它。
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents TextBox4 As System.Windows.Forms.TextBox
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents TextBox5 As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.ComboBox1 = New System.Windows.Forms.ComboBox
Me.Label5 = New System.Windows.Forms.Label
Me.TextBox4 = New System.Windows.Forms.TextBox
Me.Label4 = New System.Windows.Forms.Label
Me.TextBox3 = New System.Windows.Forms.TextBox
Me.Label3 = New System.Windows.Forms.Label
Me.TextBox2 = New System.Windows.Forms.TextBox
Me.Label2 = New System.Windows.Forms.Label
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.Label1 = New System.Windows.Forms.Label
Me.Button1 = New System.Windows.Forms.Button
Me.Button2 = New System.Windows.Forms.Button
Me.GroupBox2 = New System.Windows.Forms.GroupBox
Me.TextBox5 = New System.Windows.Forms.TextBox
Me.GroupBox1.SuspendLayout()
Me.GroupBox2.SuspendLayout()
Me.SuspendLayout()
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.ComboBox1)
Me.GroupBox1.Controls.Add(Me.Label5)
Me.GroupBox1.Controls.Add(Me.TextBox4)
Me.GroupBox1.Controls.Add(Me.Label4)
Me.GroupBox1.Controls.Add(Me.TextBox3)
Me.GroupBox1.Controls.Add(Me.Label3)
Me.GroupBox1.Controls.Add(Me.TextBox2)
Me.GroupBox1.Controls.Add(Me.Label2)
Me.GroupBox1.Controls.Add(Me.TextBox1)
Me.GroupBox1.Controls.Add(Me.Label1)
Me.GroupBox1.Location = New System.Drawing.Point(40, 24)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(240, 272)
Me.GroupBox1.TabIndex = 0
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "信息設定"
'
'ComboBox1
'
Me.ComboBox1.Items.AddRange(New Object() {"1.0", "1.2", "1.3", "1.5", "2.2", "2.6", "2.4"})
Me.ComboBox1.Location = New System.Drawing.Point(112, 224)
Me.ComboBox1.Name = "ComboBox1"
Me.ComboBox1.Size = New System.Drawing.Size(96, 20)
Me.ComboBox1.TabIndex = 9
Me.ComboBox1.Text = "請選擇你排量"
'
'Label5
'
Me.Label5.Location = New System.Drawing.Point(16, 224)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(64, 24)
Me.Label5.TabIndex = 8
Me.Label5.Text = "排量"
'
'TextBox4
'
Me.TextBox4.Location = New System.Drawing.Point(112, 176)
Me.TextBox4.Name = "TextBox4"
Me.TextBox4.Size = New System.Drawing.Size(72, 21)
Me.TextBox4.TabIndex = 7
Me.TextBox4.Text = ""
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(16, 184)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(64, 24)
Me.Label4.TabIndex = 6
Me.Label4.Text = "顏色"
'
'TextBox3
'
Me.TextBox3.Location = New System.Drawing.Point(112, 136)
Me.TextBox3.Name = "TextBox3"
Me.TextBox3.Size = New System.Drawing.Size(72, 21)
Me.TextBox3.TabIndex = 5
Me.TextBox3.Text = ""
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(16, 136)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(72, 24)
Me.Label3.TabIndex = 4
Me.Label3.Text = "發動機編號"
'
'TextBox2
'
Me.TextBox2.Location = New System.Drawing.Point(112, 96)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(72, 21)
Me.TextBox2.TabIndex = 3
Me.TextBox2.Text = ""
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(16, 96)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(64, 24)
Me.Label2.TabIndex = 2
Me.Label2.Text = "車牌號碼 "
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(112, 48)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(72, 21)
Me.TextBox1.TabIndex = 1
Me.TextBox1.Text = ""
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(16, 48)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(64, 24)
Me.Label1.TabIndex = 0
Me.Label1.Text = "車主"
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(48, 344)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(88, 24)
Me.Button1.TabIndex = 2
Me.Button1.Text = "信息輸入 "
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(328, 344)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(80, 24)
Me.Button2.TabIndex = 3
Me.Button2.Text = "退出"
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.TextBox5)
Me.GroupBox2.Location = New System.Drawing.Point(312, 32)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(168, 264)
Me.GroupBox2.TabIndex = 4
Me.GroupBox2.TabStop = False
Me.GroupBox2.Text = "信息確認"
'
'TextBox5
'
Me.TextBox5.Location = New System.Drawing.Point(3, 24)
Me.TextBox5.Multiline = True
Me.TextBox5.Name = "TextBox5"
Me.TextBox5.Size = New System.Drawing.Size(160, 264)
Me.TextBox5.TabIndex = 0
Me.TextBox5.Text = ""
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
Me.ClientSize = New System.Drawing.Size(504, 422)
Me.Controls.Add(Me.GroupBox2)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.GroupBox1)
Me.Name = "Form1"
Me.Text = "Form1"
Me.GroupBox2.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a1, a2, a3, a4, a5 As String
a1 = TextBox1.Text
a2 = TextBox2.Text
a3 = TextBox3.Text
a4 = TextBox4.Text
If TextBox2.Text = "" Then
MessageBox.Show("請輸入車牌號碼!")
Else
Dim car1 As New car(TextBox1.Text, TextBox2.Text, TextBox3.Text, TextBox4.Text, ComboBox1.Text)
TextBox5.Text = car1.TellSelf
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub
End Class
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -