VB.NET checkbox设计问题
发布网友
发布时间:2024-10-04 04:01
我来回答
共1个回答
热心网友
时间:2024-12-02 13:48
Private Sub CheckBox1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.Click
MsgBox(CheckBox1.Text)
End Sub Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
MsgBox(CheckBox2.Text)
End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If CheckBox1.Checked = True Then
MsgBox(CheckBox1.Text)
End If
If CheckBox2.Checked = True Then
MsgBox(CheckBox2.Text)
End If
End Sub在窗体上画两个checkbox,一个button,名字为默认,checkbox1的text改为打球,checkbox2的text改为看书。