VB实现点击命令按钮将对单选(复选)按钮的选择状态显示在文本框中的代码

两个单选按钮
2024-12-26 11:48:22
推荐回答(2个)
回答1:

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim fuxuan As CheckBox = New CheckBox
Dim danxuan As RadioButton = New RadioButton
fuxuan.Parent = Me
danxuan.Parent = Me
fuxuan.Location = New Point(100, 17)
danxuan.Location = New Point(240, 17)
fuxuan.Checked = True
TextBox1.Text = fuxuan.Checked.ToString + " " + danxuan.Checked.ToString
End Sub
要几个自己添加和设置

回答2:

一个单选按钮还是多个,请描述清楚,方法不一样的