RadioButton

RadioButtonは、ラジオボタンを扱うクラス・・・。

RadioButton クラス (System.Windows.Forms)

3つのラジオボタンのどれが選択されているかをチェックする・・・。

f:id:BG1:20160419182402p:plain

を選択し、Form1に配置・・・。

f:id:BG1:20160419182516p:plain

このように3つ配置・・・。

f:id:BG1:20160419182622p:plain

その下にbutton1を配置・・・。

button1が押された時、

radioButton1.CheckedがTrueならradioButton1が選択されているので、"radioButton1"を表示・・・。
radioButton2.CheckedがTrueなら"radioButton2"、
それ以外なら"radioButton3"・・・。
(実行すると、デフォルトでradioButton1が選択されているので、どれも選択されていないということは起きない・・・。)

f:id:BG1:20160419183507p:plain

これでbutton1を押すと、

f:id:BG1:20160419183536p:plain

"radioButton1"と出る・・・。

f:id:BG1:20160419183601p:plain

radioButton2を選択して、button1を押すと、

f:id:BG1:20160419183710p:plain

"radioButton2"・・・。

f:id:BG1:20160419183733p:plain

radioButton3を選択して、button1を押すと、

f:id:BG1:20160419183801p:plain

"radioButton3"となる・・・。

Sample/Program.cs at master · bg1bgst333/Sample · GitHub
Sample/Form1.cs at master · bg1bgst333/Sample · GitHub
Sample/Form1.Designer.cs at master · bg1bgst333/Sample · GitHub