1、 加粗按钮:Private Sub Check1_Click()If Check1.Value = vbChecked ThenText1.FontBold = TrueElseText1.FontBold = FalseEnd IfEnd Sub 斜体按钮:Private Sub Check2_Click()If Check2.Value = vbChecked ThenText1.FontItalic = TrueElseText1.FontItalic = FalseEnd IfEnd Sub 下划线按钮:Private Sub Check3_Click()If Check3.Value
2、 = vbChecked ThenText1.FontUnderline = TrueElseText1.FontUnderline = FalseEnd IfEnd Sub 分行显示按钮Private Sub Command1_Click()Text1.Text = “静夜思“ & vbCrLf & “床前明月光, “ & vbCrLf & “疑是地上霜。“ & vbCrLf & “举头望明月, “ & vbCrLf & “低头思故乡。 “End Sub 清除按钮Private Sub Command2_Click()Text1.Text = “End Sub 退出按钮Private Sub
3、 Command3_Click()Dim a As Integera = MsgBox(“请问您确实要退出程序吗? “, vbYesNo + vbQuestion, “作者温馨提示:“)If a = vbYes ThenEndEnd IfEnd Sub 字体颜色设置Private Sub Option1_Click()Text1.ForeColor = vbRedEnd SubPrivate Sub Option10_Click()Text1.BackColor = vbRedEnd SubPrivate Sub Option11_Click()Text1.BackColor = vbWhit
4、eEnd SubPrivate Sub Option2_Click()Text1.ForeColor = vbBlueEnd SubPrivate Sub Option3_Click()Text1.ForeColor = vbGreenEnd SubPrivate Sub Option4_Click()Text1.ForeColor = vbBlackEnd Sub 字号大小设置Private Sub Option5_Click()Text1.FontSize = 12End SubPrivate Sub Option6_Click()Text1.FontSize = 18End SubPrivate Sub Option7_Click()Text1.FontSize = 20End Sub 背景颜色设置Private Sub Option8_Click()Text1.BackColor = vbYellowEnd SubPrivate Sub Option9_Click()Text1.BackColor = vbGreenEnd Sub