vb中给文字增大缩小加下划线加删除线粗体斜体代码
2个回答
展开全部
'控件一个文本框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
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询