vb里单复选框,单选框:宋体楷体黑体,复选框:粗体斜体下划线,代码怎么写?
1个回答
展开全部
Private Sub Check1_Click()
If Check1.Value = 1 Then
Text1.FontBold = True
Else
Text1.FontBold = False
End If
End Sub
Private Sub Check2_Click()
If Check2.Value = 1 Then
Text1.FontItalic = True
Else
Text1.FontItalic = False
End If
End Sub
Private Sub Check3_Click()
If Check3.Value = 1 Then
Text1.FontUnderline = True
Else
Text1.FontUnderline = False
End If
End Sub
Private Sub Form_Load()
Text1 = "单选和复选框应用"
Me.Caption = Text1
End Sub
Private Sub Option1_Click(Index As Integer)
Text1.Font = Option1(Index).Caption
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询