请设计如下图所示窗体界面。程序运行时,在选中一个或两个复选框和一个单选按钮时, 单击命令按钮,

2024-12-22 23:03:33
推荐回答(1个)
回答1:

If Option1.Value = True Then Text1.FontName = "宋体"
If Option2.Value = True Then Text1.FontName = "隶书"

If Check1.Value = 1 Then
Text1.Font.Underline = True '下划线
Else
Text1.Font.Underline = False '下划线
End If

If Check2.Value = 1 Then
Text1.Font.Italic = True '斜体
Else
Text1.Font.Italic = False '斜体
End If

If Option2.Value = True And Check2.Value = 1 Then
MsgBox "隶书不能设为斜体"
Check2.Value = 0
End If
If Option2.Value = True And Check1.Value = 1 Then
MsgBox "隶书不能设为下划线"
Check1.Value = 0
End If