1个回答
展开全部
Private Sub Command1_Click()
Dim i As Integer
For i = 0 To 2
If Option1(i).Value = True Then
Text1.FontName = Option1(i).Caption
End If
If Option2(i).Value = True Then
Text1.FontSize = Val(Option2(i).Caption)
End If
Next i
If Option3(0).Value = True Then
Text1.ForeColor = vbBlue
ElseIf Option3(1).Value = True Then
Text1.ForeColor = &HC000C0
ElseIf Option3(2).Value = True Then
Text1.ForeColor = vbGreen
End If
End Sub
Private Sub Form_Load()
Me.Caption = "框架的使用"
Command1.Caption = "显示"
Command2.Caption = "结束"
Frame1.Caption = "字体"
Frame2.Caption = "大小"
Frame3.Caption = "颜色"
Option1(0).Caption = "宋体"
Option1(1).Caption = "隶书"
Option1(2).Caption = "幼圆"
Option1(0).Value = True
Option2(0).Caption = "14点"
Option2(1).Caption = "18点"
Option2(2).Caption = "22点"
Option2(0).Value = True
Option3(0).Caption = "蓝色"
Option3(1).Caption = "紫色"
Option3(2).Caption = "绿色"
Option3(0).Value = True
Text1.Text = ""
End Sub
不明白加百度HI发消息
Dim i As Integer
For i = 0 To 2
If Option1(i).Value = True Then
Text1.FontName = Option1(i).Caption
End If
If Option2(i).Value = True Then
Text1.FontSize = Val(Option2(i).Caption)
End If
Next i
If Option3(0).Value = True Then
Text1.ForeColor = vbBlue
ElseIf Option3(1).Value = True Then
Text1.ForeColor = &HC000C0
ElseIf Option3(2).Value = True Then
Text1.ForeColor = vbGreen
End If
End Sub
Private Sub Form_Load()
Me.Caption = "框架的使用"
Command1.Caption = "显示"
Command2.Caption = "结束"
Frame1.Caption = "字体"
Frame2.Caption = "大小"
Frame3.Caption = "颜色"
Option1(0).Caption = "宋体"
Option1(1).Caption = "隶书"
Option1(2).Caption = "幼圆"
Option1(0).Value = True
Option2(0).Caption = "14点"
Option2(1).Caption = "18点"
Option2(2).Caption = "22点"
Option2(0).Value = True
Option3(0).Caption = "蓝色"
Option3(1).Caption = "紫色"
Option3(2).Caption = "绿色"
Option3(0).Value = True
Text1.Text = ""
End Sub
不明白加百度HI发消息
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询