我已经通过将电子邮件作为文本动态创建了单选按钮,但我没有得到如何在表单加载时设置最后选择的单选按钮。 表示我最后一次检查form_load上的radiobutton show 实际上我得到文本和名称,但在表单加载我无法检查
请帮帮我
For Each c As Control In dynamictablelayout.Controls
If c.GetType Is GetType(RadioButton) Then
Dim rb As RadioButton = DirectCast(c, RadioButton)
If rb.Checked Then
selectedmailID = rb.Text
rb.Select()
If Me.dynamictablelayout.Controls.OfType(Of RadioButton)().Any(Function() rb.Checked) Then
'One of the RadioButton controls in TableLayoutPanel1 is checked.
End If
Exit For
End If
End If
Next