label1 Name label2 Time (0-23) textBox1 textBox2 textBox3 button1

Slides:



Advertisements
Similar presentations
Creating Applications With Visual Basic
Advertisements

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 2- 1 STARTING OUT WITH Visual Basic 2008 FOURTH EDITION Tony Gaddis.
CSCI 3328 Object Oriented Programming in C# Chapter 10: Graphical User Interfaces with Windows Forms 1 Xiang Lian The University of Texas – Pan American.
 2007 Dr. Natheer Khasawneh. Chapter 13. Graphical User Interface Concepts: Part 1.
Copyright © 2012 Pearson Education, Inc. Chapter 11 MORE WINDOWS CONTROLS & STANDARD DIALOG BOXES.
Chapter 3.1 Controls Programming In Visual Basic.NET.
CHAPTER TWO Creating Simple Visual Basic.NET Windows Applications.
Graphical User Interface (GUI) A GUI allows user to interact with a program visually. GUIs are built from GUI components. A GUI component is an object.
Copyright © 2012 Pearson Education, Inc. Chapter 2 Introduction to Visual C#
Creating web service (and client application) with Visual Studio 2008 Create web service project New project->web->ASP.NET web service application (with.
© 2006 ITT Educational Services Inc. Introduction to Computer Programming: Unit 1: Chapter 2: Slide 1 Unit 1 Introduction to Programming Using VB.NET Chapter.
Expression ISYS 350. Performing Calculations Basic calculations such as arithmetic calculation can be performed by math operators OperatorName of the.
CSCI 3328 Object Oriented Programming in C# Chapter 2: Introduction to Visual C# Programming 1 Xiang Lian The University of Texas Rio Grande Valley Edinburg,
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Assignment #1 Advanced Computer Programming.
Session 08: Architecture Controllers or Managers Graphical User Interface (GUI) FEN AK - IT Softwarekonstruktion.
Starting Out with Visual Basic.NET 2 nd Edition Chapter 2 Creating Applications With Visual Basic.NET.
Microsoft Visual Basic 2012 CHAPTER THREE Program Design and Coding.
By Szeto CYVisual C# Text form1Clock (label1) lblHH00 (label2) lblMM00 (label3) lblSS00 label4: label5: timer1Interval 500 Enabled true 按照下表,更改各控制項.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 12 - Graphical User Interface Concepts: Part.
Graphical User Interfaces 2 Tonga Institute of Higher Education.
Intro to More Controls in C#. C# Demonstration We already touched on labels and buttons Ad-hoc demo of controls – Textboxes Multiline – Checkbox – Radiobutton.
Lecture 16: Multithreaded Programming. public partial class Form1 : Form { Thread ct; Thread rt; public static int circle_sleep = 0; public static int.
1. S:\Courses\CSSE\ibrahima\CS2340\Notes Folder Section1 Folder Section2 2.
Sample Application Multi Layered Architecture (n-tier): –Graphical User Interface (GUI): Forms, components, controls The Visual Designer in Visual Studio.
Controls. Adding Controls to Form -You can pick controls from the toolbox. -To add the controls from Toolbox to the Form You have be in design view. -To.
Learning Targets:  Develop code blocks that use arithmetic operations  Develop programs that use subtotals and final totals 1.
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
CSC115 Introduction to Computer Programming Zhen Jiang Dept. of Computer Science West Chester University West Chester, PA 19383
McGraw-Hill © 2010 The McGraw-Hill Companies, Inc. All rights reserved. Chapter 2 User Interface Design.
You should unzip and download the beginning programs.
Introduction to Windows Forms Application By N Hanumantha Rao MCA By N Hanumantha Rao MCA.
Architecture Multi Layered Architecture (n-tier): Application: Model Controllers Database Access Graphical User Interface (GUI): Forms, components, controls.
Objects and Classes Engineering 1D04, Teaching Session 9.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Lecture Set 7 Procedures and Event Handlers Part B - The Structure of an Application Event Handlers.
Int fact (int n) { If (n == 0) return 1; else return n * fact (n – 1); } 5 void main () { Int Sum; : Sum = fact (5); : } Factorial Program Using Recursion.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Chapter 2 More Controls Programming In C Shap. © Controls in the Toolbox.
Expression ISYS 350.
Computing with C# and the .NET Framework
CSCI 3328 Object Oriented Programming in C# Chapter 2: Introduction to Visual C# Programming UTPA – Fall 2012 This set of slides is revised from lecture.
3.01 Apply Controls Associated With Visual Studio Form
3.01 Apply Controls Associated With Visual Studio Form
Expression ISYS 350.
Visual programming Chapter 3: GUI (Graphical User Interface) Part I
مراحل كتابة البرنامج بلغة فيجول بيسك ستديو
المحاضرة الأولى Lab(1) أ.ساره الأحمدي برمجة حاسب 2.
The University of Texas – Pan American
Windows Controls Child Window Controls
Expression ISYS 350.
Expression ISYS 350.
Self Study GUI Properties & Events
CS 3870 Web User Control Events.
Project Design, Forms and Buttons
Addition Project CSIT 230 (Blum).
Web Service.
If statements (Inven1, Inven2, Inven2a, Inven3, Inven3a)
Control Structures Part C – Groups of Controls
Expression ISYS 350.
OptionButton, CheckBox компоненттері
Expression ISYS 350.
BMI Form1 Body Mass Index textBox3-4 (readonly) trackBar1
Programming In Visual Basic.NET
3.Visual Basic Controls.
AB form1 Multiplication textBox1 12 textBox2 34 textBox3
Setting Properties of Objects
Command Object’s ExecuteNonQuery Method
form1 Runner pictureBox1 imageList1 timer1 label1 原地跑步計時 label2 共用了…秒
Presentation transcript:

label1 Name label2 Time (0-23) textBox1 textBox2 textBox3 button1 再按F5開始偵錯 (執行) label1 Name label2 Time (0-23) textBox1 textBox2 textBox3 button1 &Submit form1 Greeting pictureBox1 SizeMode(zoom) txtName txtTime txtMsg 其他屬性: BackColor BackgroundImage MaximumSize Font MinimumSize ForeColor Image SizeMode Enabled Size StartPosition TextAlign Text Visible by Szeto CY Visual C# 2008

雙按按鈕(Submit),並加入以下程式碼: private void button1_Click(object sender, EventArgs e) { txtMsg.Text = " Mr." + txtName.Text; } 右按,選檢視程式碼,修改程式碼: private void button1_Click(object sender, EventArgs e) { int hh = int.Parse(txtTime.Text); txtMsg.Text = hh.ToString("00"); } 修改程式碼: private void button1_Click(object sender, EventArgs e) { int hh = 999; txtMsg.Text = txtName.Text + hh; } by Szeto CY Visual C# 2008

private void button1_Click(object sender, EventArgs e) { 修改程式碼: private void button1_Click(object sender, EventArgs e) { int hh = int.Parse(txtTime.Text); } if (hh < 12) txtMsg.Text = "Good Morning"; else if (hh < 18) txtMsg.Text = "Good Afternoon"; else txtMsg.Text = "Good Evening"; txtMsg.Text += " Mr." + txtName.Text; 假若使用者沒有輸入時間,會如何? int hh = int.Parse(txtTime.Text); by Szeto CY Visual C# 2008

private void button1_Click(object sender, EventArgs e) { try 修改程式碼: private void button1_Click(object sender, EventArgs e) { try int hh = int.Parse(txtTime.Text); } catch txtMsg.Text = "Error"; if (hh < 12) txtMsg.Text = "Good Morning"; else if (hh < 18) txtMsg.Text = "Good Afternoon"; else txtMsg.Text = "Good Evening"; txtMsg.Text += " Mr." + txtName.Text; by Szeto CY Visual C# 2008