各位大虾来帮我解决这个VB的小问题?有分数哦!

2024-11-21 21:08:08
推荐回答(3个)
回答1:

Private Sub C1_Click()

Text1.FontName = "黑体"

Text1.FontName = "楷体_GB2312"
If Op1.Value Then
'黑体
Text1.FontName = "黑体"
Else
'楷体

Text1.FontName = "楷体_GB2312"
End If

End Sub

回答2:

Private Sub C1_Click()
If op1.Value = True Then
Text1.FontName = "黑体"
Else If op2.Value = True Then
Text1.FontName = 楷体_GB2312"
End If
End Sub

回答3:

"切换"按钮 单击事件里的代码:
if OP1.value then
Text1.FontName="黑体"
else
if OP2.value then
Text1.FontName="楷体_GB2312"
else
Text1.FontName="宋体"
end if