.. 加粗按钮: Private Sub Check1_Click() If Check1.Value = vbChecked Then Text1.FontBold = True Else Text1.FontBold = False End If End Sub 斜体按钮: Private Sub Check2_Click() If Check2.Value = vbChecked Then Text1.FontItalic = True Else Text1.FontItalic = False End If End Sub 下划线按钮: Private Sub Check3_Click() If Check3.Value = vbChecked Then Text1.FontUnderline = True Else Text1.FontUnderline = False End If End Sub 分行显示按钮 Private Sub Command1_Click() ;. .. Text1.Text = "《静夜思》" & vbCrLf & "床前明月光, " & vbCrLf & "疑是地上霜。" & vbCrLf & "举头望明月, " & vbCrLf & "低头思故乡。 " End Sub 清除按钮 Private Sub Command2_Click() Text1.Text = "" End Sub 退出按钮 Private Sub Command3_Click() Dim a As Integer a = MsgBox("请问您确实要退出程序吗?", vbYesNo + vbQuestion, "作者温馨提示:") If a = vbYes Then End End If End Sub 字体颜色设置 Private Sub Option1_Click() Text1.ForeColor = vbRed End Sub Private Sub Option10_Click() Text1.BackColor = vbRed End Sub Private Sub Option11_Click() Text1.BackColor = vbWhite End Sub Private Sub Option2_Click() Text1.ForeColor = vbBlue End Sub Private Sub Option3_Click() Text1.ForeColor = vbGreen End Sub Private Sub Option4_Click() Text1.ForeColor = vbBlack End Sub 字号大小设置 Private Sub Option5_Click() Text1.FontSize = 12 End Sub ;. .. Private Sub Option6_Click() Text1.FontSize = 18 End Sub Private Sub Option7_Click() Text1.FontSize = 20 End Sub 背景颜色设置 Private Sub Option8_Click() Text1.BackColor = vbYellow End Sub Private Sub Option9_Click() Text1.BackColor = vbGreen End Sub ;. 本文来源:https://www.wddqw.com/doc/faf539160aa1284ac850ad02de80d4d8d15a01a5.html