2013-08-10
展开全部
添加一个text 添加一个list 编写以下代码:Private Sub Form_Load()List1.AddItem ("粗体")
List1.AddItem ("倾斜")
List1.AddItem ("下划线")
List1.AddItem ("删除线")
End SubPrivate Sub List1_Click()
Select Case List1.Text
Case "粗体"
Text1.FontBold = True
Text1.FontItalic = False
Text1.FontUnderline = False
Text1.FontStrikethru = False
Case "倾斜"
Text1.FontItalic = True
Text1.FontBold = False
Text1.FontUnderline = False
Text1.FontStrikethru = False
Case "下划线"
Text1.FontUnderline = True
Text1.FontBold = False
Text1.FontItalic = False
Text1.FontStrikethru = False
Case "删除线"
Text1.FontStrikethru = True
Text1.FontBold = False
Text1.FontItalic = False
Text1.FontUnderline = False
End SelectEnd Sub
List1.AddItem ("倾斜")
List1.AddItem ("下划线")
List1.AddItem ("删除线")
End SubPrivate Sub List1_Click()
Select Case List1.Text
Case "粗体"
Text1.FontBold = True
Text1.FontItalic = False
Text1.FontUnderline = False
Text1.FontStrikethru = False
Case "倾斜"
Text1.FontItalic = True
Text1.FontBold = False
Text1.FontUnderline = False
Text1.FontStrikethru = False
Case "下划线"
Text1.FontUnderline = True
Text1.FontBold = False
Text1.FontItalic = False
Text1.FontStrikethru = False
Case "删除线"
Text1.FontStrikethru = True
Text1.FontBold = False
Text1.FontItalic = False
Text1.FontUnderline = False
End SelectEnd Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |