Private Sub btn_run_Click(sender As System.Object, e As System.EventArgs) Handles btn_run.Click
Dim msgTxt As String = "你選的是" & vbCrLf
Dim ObjCB2 As RadioButton
For Each tmpRB As Object In Me.Controls
If tmpRB.GetType.ToString() = "System.Windows.Forms.RadioButton" Then
ObjCB2 = CType(tmpRB, RadioButton)
If ObjCB2.Checked Then
msgTxt = msgTxt + ObjCB2.Text + vbCrLf
End If
End If
Next
MsgBox(msgTxt)
End Sub