vb 文本框编写程序,实现设置文本框内文本 字体、大小、颜色 的功能,要求用到框架、控件数组和单选按钮实
包括界面设计,力求规整,美观!一定给高分高手帮帮忙吧www.1131636958@qq.com...
包括 界面设计,力求规整,美观!一定给高分 高手帮帮忙吧
www.1131636958@qq.com 展开
www.1131636958@qq.com 展开
展开全部
Private Sub Check1_Click(Index As Integer)
If Index = 0 Then
If Text1.FontBold = False Then
Text1.FontBold = True
Else
Text1.FontBold = False
End If
ElseIf Index = 1 Then
If Text1.FontItalic = False Then
Text1.FontItalic = True
Else
Text1.FontItalic = False
End If
ElseIf Index = 2 Then
If Text1.FontUnderline = False Then
Text1.FontUnderline = True
Else
Text1.FontUnderline = False
End If
End If
End Sub
Private Sub Combo1_Click()
Text1.FontSize = Val(Combo1.Text)
End Sub
Private Sub Form_Load()
End Sub
Private Sub Option1_Click(Index As Integer)
If Index = 1 Then
Text1.Font = "仿宋_GB2312"
ElseIf Index = 2 Then
Text1.Font = "黑体"
ElseIf Index = 3 Then
Text1.Font = "楷体_GB2312"
End If
End Sub
Private Sub Text2_Change()
Text1.FontSize = Val(Text2.Text)
End Sub
Private Sub Text3_Change(Index As Integer)
Text1.ForeColor = RGB(Val(Text3(0)), Val(Text3(1)), Val(Text3(2)))
End Sub
If Index = 0 Then
If Text1.FontBold = False Then
Text1.FontBold = True
Else
Text1.FontBold = False
End If
ElseIf Index = 1 Then
If Text1.FontItalic = False Then
Text1.FontItalic = True
Else
Text1.FontItalic = False
End If
ElseIf Index = 2 Then
If Text1.FontUnderline = False Then
Text1.FontUnderline = True
Else
Text1.FontUnderline = False
End If
End If
End Sub
Private Sub Combo1_Click()
Text1.FontSize = Val(Combo1.Text)
End Sub
Private Sub Form_Load()
End Sub
Private Sub Option1_Click(Index As Integer)
If Index = 1 Then
Text1.Font = "仿宋_GB2312"
ElseIf Index = 2 Then
Text1.Font = "黑体"
ElseIf Index = 3 Then
Text1.Font = "楷体_GB2312"
End If
End Sub
Private Sub Text2_Change()
Text1.FontSize = Val(Text2.Text)
End Sub
Private Sub Text3_Change(Index As Integer)
Text1.ForeColor = RGB(Val(Text3(0)), Val(Text3(1)), Val(Text3(2)))
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
留下e-mail
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询