3-2-5 テキスト ボックスを 追加 する。
4.csを
1. サンプル プログラム 5.csを
ここから
サンプル プログラム "5.cs"
1: using System;
2: using System.Drawing;
3: using System.Windows.Forms;
4:
5: class Hello: Form
6: {
7: static void btnOnClick(object sender, EventArgs e)
8: {
9: MessageBox.Show("
10: }
11:
12: public static void Main()
13: {
14: Hello hw = new Hello();
15: hw.Text = "アプリケーション
16:
17: TextBox box = new TextBox();
18: box.Parent = hw;
19: box.Text = "こんにちは";
20:
21: Button btn = new Button();
22: btn.Parent = hw;
23: btn.Location = new Point(0, box.Height);
24: btn.Text = "Push";
25: btn.Click += new EventHandler(btnOnClick);
26:
27: Application.Run(hw);
28: }
29: }
2. 「
3. この プログラムを コンパイル し、
4.
・
-
・ テキスト ボックスの
・
・
5.exe