'控件一个文本框text1,五个按钮command1至command5
Private Sub Command1_Click() '增大字体
Text1.FontSize = Text1.FontSize + 1
End Sub
Private Sub Command2_Click() '缩小字体
If Text1.FontSize > 2 Then Text1.FontSize = Text1.FontSize - 1
End Sub
Private Sub Command3_Click() '变换下划线
Text1.FontUnderline = Not Text1.FontUnderline
End Sub
Private Sub Command4_Click() '变换粗体
Text1.FontBold = Not Text1.FontBold
End Sub
Private Sub Command5_Click() '变换斜体
Text1.FontItalic = Not Text1.FontItalic
End Sub
看一下font属性就知道了