求用VB设计一个关于字体字号的程序?

2025-01-05 03:46:14
推荐回答(1个)
回答1:

添加如下代码:

Private Sub Check1_Click()
Text1.FontUnderline = Not Text1.FontUnderline
End Sub

Private Sub Check2_Click()
Text1.FontItalic = Not Text1.FontItalic

End Sub

Private Sub Check3_Click()
Text1.FontBold = Not Text1.FontBold
End Sub

Private Sub Option1_Click()
Text1.FontName = "黑体"
End Sub

Private Sub Option2_Click()
Text1.FontName = "楷体_GB2312"
End Sub

Private Sub Option3_Click()
Text1.FontName = "隶书" '我的电脑没有隶书字体,所以调试时出错
End Sub

Private Sub Option4_Click()
Text1.FontSize = 12
End Sub

Private Sub Option5_Click()
Text1.FontSize = 16
End Sub

Private Sub Option6_Click()
Text1.FontSize = 20
End Sub