⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 formmain.vb

📁 Visual Basic.net 实例入门
💻 VB
📖 第 1 页 / 共 2 页
字号:
Public Class form1
    Inherits System.Windows.Forms.Form

#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.
    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
    Friend WithEvents tResult As System.Windows.Forms.TextBox
    Friend WithEvents btCE As System.Windows.Forms.Button
    Friend WithEvents btNum8 As System.Windows.Forms.Button
    Friend WithEvents btNum9 As System.Windows.Forms.Button
    Friend WithEvents btNum4 As System.Windows.Forms.Button
    Friend WithEvents btNum5 As System.Windows.Forms.Button
    Friend WithEvents btNum6 As System.Windows.Forms.Button
    Friend WithEvents btNum7 As System.Windows.Forms.Button
    Friend WithEvents btNum1 As System.Windows.Forms.Button
    Friend WithEvents btNum2 As System.Windows.Forms.Button
    Friend WithEvents btNum3 As System.Windows.Forms.Button
    Friend WithEvents btMul As System.Windows.Forms.Button
    Friend WithEvents btBackspace As System.Windows.Forms.Button
    Friend WithEvents btEqu As System.Windows.Forms.Button
    Friend WithEvents btDiv As System.Windows.Forms.Button
    Friend WithEvents btAdd As System.Windows.Forms.Button
    Friend WithEvents btSub As System.Windows.Forms.Button
    Friend WithEvents btC As System.Windows.Forms.Button
    Friend WithEvents btDot As System.Windows.Forms.Button
    Friend WithEvents btNum0 As System.Windows.Forms.Button
    Friend WithEvents btNeg As System.Windows.Forms.Button
    Friend WithEvents pKey As System.Windows.Forms.Panel
    Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
    Friend WithEvents mExit As System.Windows.Forms.MenuItem
    Friend WithEvents mHelp As System.Windows.Forms.MenuItem
    Friend WithEvents mAbout As System.Windows.Forms.MenuItem
    Friend WithEvents mFile As System.Windows.Forms.MenuItem
    
    '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.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.btC = New System.Windows.Forms.Button()
        Me.btSub = New System.Windows.Forms.Button()
        Me.btMul = New System.Windows.Forms.Button()
        Me.mAbout = New System.Windows.Forms.MenuItem()
        Me.btDiv = New System.Windows.Forms.Button()
        Me.btCE = New System.Windows.Forms.Button()
        Me.btAdd = New System.Windows.Forms.Button()
        Me.btBackspace = New System.Windows.Forms.Button()
        Me.btNum8 = New System.Windows.Forms.Button()
        Me.btNum9 = New System.Windows.Forms.Button()
        Me.btNum2 = New System.Windows.Forms.Button()
        Me.btNum3 = New System.Windows.Forms.Button()
        Me.MainMenu1 = New System.Windows.Forms.MainMenu()
        Me.mFile = New System.Windows.Forms.MenuItem()
        Me.mExit = New System.Windows.Forms.MenuItem()
        Me.mHelp = New System.Windows.Forms.MenuItem()
        Me.btNum1 = New System.Windows.Forms.Button()
        Me.btNum6 = New System.Windows.Forms.Button()
        Me.btNum4 = New System.Windows.Forms.Button()
        Me.btNum5 = New System.Windows.Forms.Button()
        Me.btNum0 = New System.Windows.Forms.Button()
        Me.btDot = New System.Windows.Forms.Button()
        Me.btNum7 = New System.Windows.Forms.Button()
        Me.tResult = New System.Windows.Forms.TextBox()
        Me.pKey = New System.Windows.Forms.Panel()
        Me.btEqu = New System.Windows.Forms.Button()
        Me.btNeg = New System.Windows.Forms.Button()
        Me.SuspendLayout()
        '
        'btC
        '
        Me.btC.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.btC.ForeColor = System.Drawing.Color.Red
        Me.btC.Location = New System.Drawing.Point(168, 40)
        Me.btC.Name = "btC"
        Me.btC.Size = New System.Drawing.Size(32, 23)
        Me.btC.TabIndex = 44
        Me.btC.TabStop = False
        Me.btC.Text = "C"
        '
        'btSub
        '
        Me.btSub.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.btSub.ForeColor = System.Drawing.Color.Red
        Me.btSub.Location = New System.Drawing.Point(128, 136)
        Me.btSub.Name = "btSub"
        Me.btSub.Size = New System.Drawing.Size(32, 23)
        Me.btSub.TabIndex = 13
        Me.btSub.TabStop = False
        Me.btSub.Text = "-"
        '
        'btMul
        '
        Me.btMul.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.btMul.ForeColor = System.Drawing.Color.Red
        Me.btMul.Location = New System.Drawing.Point(128, 104)
        Me.btMul.Name = "btMul"
        Me.btMul.Size = New System.Drawing.Size(32, 23)
        Me.btMul.TabIndex = 12
        Me.btMul.TabStop = False
        Me.btMul.Text = "*"
        '
        'mAbout
        '
        Me.mAbout.Index = 0
        Me.mAbout.Text = "关于计算器(&A)..."
        '
        'btDiv
        '
        Me.btDiv.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.btDiv.ForeColor = System.Drawing.Color.Red
        Me.btDiv.Location = New System.Drawing.Point(128, 72)
        Me.btDiv.Name = "btDiv"
        Me.btDiv.Size = New System.Drawing.Size(32, 23)
        Me.btDiv.TabIndex = 11
        Me.btDiv.TabStop = False
        Me.btDiv.Text = "/"
        '
        'btCE
        '
        Me.btCE.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.btCE.ForeColor = System.Drawing.Color.Red
        Me.btCE.Location = New System.Drawing.Point(128, 40)
        Me.btCE.Name = "btCE"
        Me.btCE.Size = New System.Drawing.Size(32, 23)
        Me.btCE.TabIndex = 33
        Me.btCE.TabStop = False
        Me.btCE.Text = "CE"
        '
        'btAdd
        '
        Me.btAdd.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.btAdd.ForeColor = System.Drawing.Color.Red
        Me.btAdd.Location = New System.Drawing.Point(128, 168)
        Me.btAdd.Name = "btAdd"
        Me.btAdd.Size = New System.Drawing.Size(32, 23)
        Me.btAdd.TabIndex = 14
        Me.btAdd.TabStop = False
        Me.btAdd.Text = "+"
        '
        'btBackspace
        '
        Me.btBackspace.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.btBackspace.ForeColor = System.Drawing.Color.Red
        Me.btBackspace.Location = New System.Drawing.Point(48, 40)
        Me.btBackspace.Name = "btBackspace"
        Me.btBackspace.Size = New System.Drawing.Size(72, 23)
        Me.btBackspace.TabIndex = 22
        Me.btBackspace.TabStop = False
        Me.btBackspace.Text = "BackSpace"
        '
        'btNum8
        '
        Me.btNum8.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.btNum8.ForeColor = System.Drawing.Color.Blue
        Me.btNum8.Location = New System.Drawing.Point(48, 72)
        Me.btNum8.Name = "btNum8"
        Me.btNum8.Size = New System.Drawing.Size(32, 23)
        Me.btNum8.TabIndex = 22
        Me.btNum8.TabStop = False
        Me.btNum8.Text = "8"
        '
        'btNum9
        '
        Me.btNum9.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.btNum9.ForeColor = System.Drawing.Color.Blue
        Me.btNum9.Location = New System.Drawing.Point(88, 72)
        Me.btNum9.Name = "btNum9"
        Me.btNum9.Size = New System.Drawing.Size(32, 23)
        Me.btNum9.TabIndex = 15
        Me.btNum9.TabStop = False
        Me.btNum9.Text = "9"
        '
        'btNum2
        '
        Me.btNum2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.btNum2.ForeColor = System.Drawing.Color.Blue
        Me.btNum2.Location = New System.Drawing.Point(48, 136)
        Me.btNum2.Name = "btNum2"
        Me.btNum2.Size = New System.Drawing.Size(32, 23)
        Me.btNum2.TabIndex = 20
        Me.btNum2.TabStop = False
        Me.btNum2.Text = "2"
        '
        'btNum3
        '
        Me.btNum3.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.btNum3.ForeColor = System.Drawing.Color.Blue
        Me.btNum3.Location = New System.Drawing.Point(88, 136)
        Me.btNum3.Name = "btNum3"
        Me.btNum3.Size = New System.Drawing.Size(32, 23)
        Me.btNum3.TabIndex = 17
        Me.btNum3.TabStop = False
        Me.btNum3.Text = "3"
        '
        'MainMenu1
        '
        Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mFile, Me.mHelp})
        '
        'mFile
        '
        Me.mFile.Index = 0
        Me.mFile.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mExit})
        Me.mFile.Text = "文件(&F)"
        '
        'mExit
        '
        Me.mExit.Index = 0
        Me.mExit.Text = "退出(&X)"
        '
        'mHelp
        '
        Me.mHelp.Index = 1
        Me.mHelp.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mAbout})
        Me.mHelp.Text = "帮助(&H)"
        '
        'btNum1
        '
        Me.btNum1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.btNum1.ForeColor = System.Drawing.Color.Blue
        Me.btNum1.Location = New System.Drawing.Point(8, 136)
        Me.btNum1.Name = "btNum1"
        Me.btNum1.Size = New System.Drawing.Size(32, 23)
        Me.btNum1.TabIndex = 99
        Me.btNum1.TabStop = False
        Me.btNum1.Text = "1"
        '
        'btNum6
        '
        Me.btNum6.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.btNum6.ForeColor = System.Drawing.Color.Blue
        Me.btNum6.Location = New System.Drawing.Point(88, 104)
        Me.btNum6.Name = "btNum6"
        Me.btNum6.Size = New System.Drawing.Size(32, 23)
        Me.btNum6.TabIndex = 16
        Me.btNum6.TabStop = False
        Me.btNum6.Text = "6"
        '
        'btNum4
        '
        Me.btNum4.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.btNum4.ForeColor = System.Drawing.Color.Blue
        Me.btNum4.Location = New System.Drawing.Point(8, 104)
        Me.btNum4.Name = "btNum4"
        Me.btNum4.Size = New System.Drawing.Size(32, 23)
        Me.btNum4.TabIndex = 88
        Me.btNum4.TabStop = False
        Me.btNum4.Text = "4"
        '
        'btNum5
        '
        Me.btNum5.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.btNum5.ForeColor = System.Drawing.Color.Blue
        Me.btNum5.Location = New System.Drawing.Point(48, 104)
        Me.btNum5.Name = "btNum5"
        Me.btNum5.Size = New System.Drawing.Size(32, 23)
        Me.btNum5.TabIndex = 21
        Me.btNum5.TabStop = False
        Me.btNum5.Text = "5"
        '
        'btNum0
        '
        Me.btNum0.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.btNum0.ForeColor = System.Drawing.Color.Blue
        Me.btNum0.Location = New System.Drawing.Point(8, 168)
        Me.btNum0.Name = "btNum0"
        Me.btNum0.Size = New System.Drawing.Size(32, 23)
        Me.btNum0.TabIndex = 100
        Me.btNum0.TabStop = False
        Me.btNum0.Text = "0"
        '
        'btDot
        '
        Me.btDot.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.btDot.ForeColor = System.Drawing.Color.Blue
        Me.btDot.Location = New System.Drawing.Point(88, 168)
        Me.btDot.Name = "btDot"
        Me.btDot.Size = New System.Drawing.Size(32, 23)
        Me.btDot.TabIndex = 18
        Me.btDot.TabStop = False
        Me.btDot.Text = "."
        '

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -