Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1.   Private Sub btn_run_Click(sender As System.Object, e As System.EventArgs) Handles btn_run.Click
  2.         Dim msgTxt As String = "你選的是" & vbCrLf
  3.         Dim ObjCB2 As RadioButton
  4.  
  5.         For Each tmpRB As Object In Me.Controls
  6.             If tmpRB.GetType.ToString() = "System.Windows.Forms.RadioButton" Then
  7.                 ObjCB2 = CType(tmpRB, RadioButton)
  8.                 If ObjCB2.Checked Then
  9.                     msgTxt = msgTxt + ObjCB2.Text + vbCrLf
  10.                 End If
  11.             End If
  12.         Next
  13.         MsgBox(msgTxt)
  14.   End Sub