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

📄 form1.vb

📁 It s a some program which can do some typing and editing
💻 VB
📖 第 1 页 / 共 2 页
字号:
        '
        'ToolBarButton1
        '
        Me.ToolBarButton1.Style = System.Windows.Forms.ToolBarButtonStyle.Separator
        '
        'btnNew
        '
        Me.btnNew.ImageIndex = 3
        '
        'btnOpen
        '
        Me.btnOpen.ImageIndex = 4
        '
        'btnSave
        '
        Me.btnSave.ImageIndex = 7
        '
        'btnPrint
        '
        Me.btnPrint.ImageIndex = 6
        '
        'ToolBarButton5
        '
        Me.ToolBarButton5.Style = System.Windows.Forms.ToolBarButtonStyle.Separator
        '
        'btnCut
        '
        Me.btnCut.ImageIndex = 1
        '
        'btnCopy
        '
        Me.btnCopy.ImageIndex = 0
        '
        'btnPaste
        '
        Me.btnPaste.ImageIndex = 5
        '
        'ToolBarButton8
        '
        Me.ToolBarButton8.Style = System.Windows.Forms.ToolBarButtonStyle.Separator
        '
        'btnHelp
        '
        Me.btnHelp.ImageIndex = 2
        '
        'ToolBarButton2
        '
        Me.ToolBarButton2.Style = System.Windows.Forms.ToolBarButtonStyle.Separator
        '
        'ImageList1
        '
        Me.ImageList1.ImageSize = New System.Drawing.Size(16, 15)
        Me.ImageList1.ImageStream = CType(resources.GetObject("ImageList1.ImageStream"), System.Windows.Forms.ImageListStreamer)
        Me.ImageList1.TransparentColor = System.Drawing.Color.Transparent
        '
        'tspFormatting
        '
        Me.tspFormatting.Appearance = System.Windows.Forms.ToolBarAppearance.Flat
        Me.tspFormatting.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.ToolBarButton3, Me.btnLeft, Me.btnCenter, Me.btnRight, Me.ToolBarButton4})
        Me.tspFormatting.ButtonSize = New System.Drawing.Size(16, 16)
        Me.tspFormatting.DropDownArrows = True
        Me.tspFormatting.ImageList = Me.ImageList1
        Me.tspFormatting.Location = New System.Drawing.Point(0, 27)
        Me.tspFormatting.Name = "tspFormatting"
        Me.tspFormatting.ShowToolTips = True
        Me.tspFormatting.Size = New System.Drawing.Size(292, 27)
        Me.tspFormatting.TabIndex = 1
        Me.tspFormatting.Visible = False
        '
        'ToolBarButton3
        '
        Me.ToolBarButton3.Style = System.Windows.Forms.ToolBarButtonStyle.Separator
        '
        'btnLeft
        '
        Me.btnLeft.ImageIndex = 10
        '
        'btnCenter
        '
        Me.btnCenter.ImageIndex = 8
        '
        'btnRight
        '
        Me.btnRight.ImageIndex = 9
        '
        'ToolBarButton4
        '
        Me.ToolBarButton4.Style = System.Windows.Forms.ToolBarButtonStyle.Separator
        '
        'Panel1
        '
        Me.Panel1.Controls.Add(Me.TextBox2)
        Me.Panel1.Controls.Add(Me.TextBox1)
        Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill
        Me.Panel1.Location = New System.Drawing.Point(0, 54)
        Me.Panel1.Name = "Panel1"
        Me.Panel1.Size = New System.Drawing.Size(292, 60)
        Me.Panel1.TabIndex = 2
        '
        'TextBox2
        '
        Me.TextBox2.Location = New System.Drawing.Point(16, 32)
        Me.TextBox2.Name = "TextBox2"
        Me.TextBox2.Size = New System.Drawing.Size(248, 21)
        Me.TextBox2.TabIndex = 1
        Me.TextBox2.Text = ""
        '
        'TextBox1
        '
        Me.TextBox1.Location = New System.Drawing.Point(16, 0)
        Me.TextBox1.Name = "TextBox1"
        Me.TextBox1.Size = New System.Drawing.Size(248, 21)
        Me.TextBox1.TabIndex = 0
        Me.TextBox1.Text = ""
        '
        'Form1
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
        Me.ClientSize = New System.Drawing.Size(292, 114)
        Me.Controls.Add(Me.Panel1)
        Me.Controls.Add(Me.tspFormatting)
        Me.Controls.Add(Me.tspMain)
        Me.Menu = Me.MainMenu1
        Me.Name = "Form1"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = "Menu Demo"
        Me.Panel1.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub exitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles exitToolStripMenuItem.Click

        Me.Close()

    End Sub

    Private Sub newToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles newToolStripMenuItem.Click

        TextBox1.Text = String.Empty

        TextBox2.Text = String.Empty

        TextBox1.Focus()

    End Sub

    Private Sub undoToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles undoToolStripMenuItem.Click

        Dim objTextBox As TextBox = Me.ActiveControl

        objTextBox.Undo()

    End Sub

    Private Sub cutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cutToolStripMenuItem.Click

        Dim objTextBox As TextBox = Me.ActiveControl

        objTextBox.Cut()

    End Sub

    Private Sub copyToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles copyToolStripMenuItem.Click

        Dim objTextBox As TextBox = Me.ActiveControl

        objTextBox.Copy()

    End Sub

    Private Sub PasteToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PasteToolStripMenuItem.Click

        Dim objTextBox As TextBox = Me.ActiveControl

        objTextBox.Paste()

    End Sub

    Private Sub selectAllToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles selectAllToolStripMenuItem.Click

        Dim objTextBox As TextBox = Me.ActiveControl

        objTextBox.SelectAll()

    End Sub

    Private Sub formattingToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles formattingToolStripMenuItem.Click


        formattingToolStripMenuItem.Checked = Not formattingToolStripMenuItem.Checked

        tspFormatting.Visible = Not tspFormatting.Visible


    End Sub

    Private Sub mainToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mainToolStripMenuItem.Click

        mainToolStripMenuItem.Checked = Not mainToolStripMenuItem.Checked


        tspMain.Visible = Not tspMain.Visible

    End Sub

    Private Sub tspFormatting_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles tspFormatting.ButtonClick

    End Sub
End Class

⌨️ 快捷键说明

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