Presentation is loading. Please wait.

Presentation is loading. Please wait.

雙按button1,2,3,4 Method 方法/動作 textBox2.Text textBox1 textBox3.Text 轉為數字 c是數字 int c = int.Parse(textBox1.Text) + …; textBox3.Text = c.ToString();

Similar presentations


Presentation on theme: "雙按button1,2,3,4 Method 方法/動作 textBox2.Text textBox1 textBox3.Text 轉為數字 c是數字 int c = int.Parse(textBox1.Text) + …; textBox3.Text = c.ToString();"— Presentation transcript:

1

2

3

4 雙按button1,2,3,4 Method 方法/動作 textBox2.Text textBox1 textBox3.Text 轉為數字 c是數字 int c = int.Parse(textBox1.Text) + …; textBox3.Text = c.ToString(); Text 是文字 轉為文字

5 工具箱 Tool Box 表單 Form 屬性 Properties 從工具箱拉出以上控制項 再按F5開始偵錯 (執行)
by Szeto CY Visual C# 2008

6 label1 Name label2 Class# label3 Email textBox1 Chan TM textBox2 4A01
再按F5開始偵錯 (執行) label1 Name label2 Class# label3 textBox1 Chan TM textBox2 4A01 textBox3 button1 &Submit form1 Student Card 其他屬性: BackColor BackgroundImage MaximumSize Font MinimumSize ForeColor Enabled Size StartPosition TextAlign Text Visible by Szeto CY Visual C# 2008

7 private void button2_Click(object sender, EventArgs e) {
Ex1 加一個按鈕 (Exit) 雙按按鈕,並加入以下程式碼: Exit private void button2_Click(object sender, EventArgs e) { Application.Exit(); } 加另一個按鈕 (中文) 雙按按鈕,並加入以下程式碼: 中文 private void button3_Click(object sender, EventArgs e) { textBox1.Text = "陳大文"; } 雙按表單 Form1,並加入以下程式碼: private void Form1_Load(object sender, EventArgs e) { textBox1.Focus(); } by Szeto CY Visual C# 2008

8 Ex2 textBox1.Text textBox2.Text textBox3.Text button1 12 31 25 Calculate txtMin.Text txtMid.Text txtMax.Text txtSum.Text 12 25 31 68 Ex3 int n; n = int.parse(textBox1.Text); // 文字轉整數n Temperature: C to F Roman Numerals n = 36.5; textBox1.Text = n.ToString(); // 整數n轉文字 Clock Mortgage / Loan BMI Scientific Notation


Download ppt "雙按button1,2,3,4 Method 方法/動作 textBox2.Text textBox1 textBox3.Text 轉為數字 c是數字 int c = int.Parse(textBox1.Text) + …; textBox3.Text = c.ToString();"

Similar presentations


Ads by Google