AIabcd 发表于 2024-7-12 18:02

vb.net控件学习 StatusStrip1控件、MenuStrip1控件、ContextMenuStrip1控件

本帖最后由 AIabcd 于 2024-7-13 07:31 编辑


    Private Sub 剪切ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 剪切ToolStripMenuItem.Click, ToolStripMenuItem1.Click
      RichTextBox1.SelectAll()
      RichTextBox1.Cut()
      ToolStripStatusLabel2.Text = "剪切"
    End Sub

    Private Sub 复制ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 复制ToolStripMenuItem.Click, ToolStripMenuItem2.Click
      RichTextBox1.Copy()
      ToolStripStatusLabel2.Text = "复制"
    End Sub

    Private Sub 粘贴ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 粘贴ToolStripMenuItem.Click, ToolStripMenuItem3.Click
      RichTextBox2.Paste()
      ToolStripStatusLabel2.Text = "粘贴"
    End Sub

    Private Sub 清空ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 清空ToolStripMenuItem.Click, ToolStripMenuItem4.Click
      RichTextBox2.Clear()
      ToolStripStatusLabel2.Text = "清空"
    End Sub

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
      ToolStripStatusLabel3.Text = Now
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
      RichTextBox1.Text = "欢迎来到吾爱论坛"
    End Sub

嫑只喊呺 发表于 2024-7-13 00:03

前排向大神学习一下~~~~
页: [1]
查看完整版本: vb.net控件学习 StatusStrip1控件、MenuStrip1控件、ContextMenuStrip1控件