TextBox

TextBoxは、テキストボックスコントロールのクラス・・・。テキストボックスは、エディットボックスと呼ばれたりもする・・・。

TextBox クラス (System.Windows.Forms)

あるボタンを押すと、テキストボックスにとあるテキストをセットし、もうひとつのボタンを押すと、テキストボックスのテキストをメッセージボックスで表示する・・・。

f:id:BG1:20160418220756p:plain

button1を上に配置・・・。

f:id:BG1:20160418220926p:plain

TextBoxのtextBox1は、

f:id:BG1:20160418221124p:plain

真ん中に・・・。そして、下にbutton2を置く・・・。

button1が押された時は、

textBox1.Textに"ABCDE"をセットする・・・。

button2が押された時は、

textBox1.TextをMessageBoxで表示する・・・。

f:id:BG1:20160418223628p:plain

この状態でbutton1を押すと、

f:id:BG1:20160418223653p:plain

textBox1に"ABCDE"がセットされる・・・。

button2を押すと、

f:id:BG1:20160418223809p:plain

メッセージボックスでtextBox1の中身の"ABCDE"を表示・・・。

f:id:BG1:20160418223924p:plain

textBox1に"hoge"と入力する・・・。
これでbutton2を押すと、

f:id:BG1:20160418224005p:plain

"hoge"と表示・・・。
さらにbutton1を押すと、

f:id:BG1:20160418224659p:plain

textBox1が"ABCDE"に再セットされる・・・。

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