Addition Project CSIT 230 (Blum).

Slides:



Advertisements
Similar presentations
Enter question text... 1.Enter answer text.... Enter question text... 1.Enter answer text...
Advertisements

Enter question text... 1.Enter answer text.... Enter question text... 1.Enter answer text...
Chapter 3.1 Controls Programming In Visual Basic.NET.
© by Pearson Education, Inc. All Rights Reserved. continued …
Chapter Creating Applications With Visual Basic 2.
Slide 1 Chapter 2 Visual Basic Interface. Slide 2 Chapter 2 Windows GUI  A GUI is a graphical user interface.  The interface is what appears on the.
05/09/ Introducing Visual Basic Sequence Programming.
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
© 2006 Lawrenceville Press Slide 1 Chapter 3 Visual Basic Interface.
Chapter 2 More Controls Programming in C#. NET © 2003 by The McGraw-Hill Companies, Inc. All rights reserved.
Problem Create a Windows-based application that will calculate the Gross Pay earned for a worker, given the number of hours worked and hourly pay rate.
Chapter 3: Using GUI Objects and the Visual Studio IDE.
08/10/ Iteration Loops For … To … Next. 208/10/2015 Learning Objectives Define a program loop. State when a loop will end. State when the For.
Copyright © 2014 Pearson Education, Inc. Chapter 2 Creating Applications with Visual Basic.
Microsoft Visual Basic 2005 CHAPTER 4 Variables and Arithmetic Operations.
Programming with Visual C++: Concepts and Projects Chapter 3B: Integral Data (Tutorial)
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 3 Welcome Application Introduction to Visual Programming.
1. S:\Courses\CSSE\ibrahima\CS2340\Notes Folder Section1 Folder Section2 2.
Visual Basic.net Textbox & Label Controls. Textbox Naming convention (txt) Primary use (user input) Can except numeric and character values.
Working with the VB IDE. Running a Program u Clicking the”start” tool begins the program u The “break” tool pauses a program in mid-execution u The “end”
Button and Textbox. Input  Input objects are used to obtain input from the user viewing the webpage. They allow the user to interact with the Web. 
OBJECTIVES: To open an existing Project called HelloWorld. To learn how set properties using the property window and how to set them in the code. Chapter.
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.
Class 3 Remote Instruction Computer Math EDU 556 Programming for Instruction Dr. Steve Broskoske This is an audio PowerCast. Make sure your volume is.
Data Types and Variables. Data Type! Computers are all about Data! Data can be in the form of Text Dates Sounds Pictures.
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.
Graphical User Interface You will be used to using programs that have a graphical user interface (GUI). So far you have been writing programs that have.
1 Advanced Computer Programming Lab Calculator Project.
You should unzip and download the beginning programs.
Chapter 4 Variables and constants. 4.1 Variables -Use of variables is good programming style -easier to modify -easier for a programmer to understand.
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 2A Reading, Processing and Displaying Data (Concepts)
Pay Example (PFirst98) Please use speaker notes for additional information!
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 4 Designing the Inventory Application Introducing TextBox es and Button s.
31/01/ Selection If selection construct.
Chapter 2 More Controls Programming in C#. NET Objectives Use text boxes, group boxes, check boxes, radio buttons, and picture boxes effectively.
2c – Textboxes and Buttons Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
Addison Wesley is an imprint of © 2011 Pearson Addison-Wesley. All rights reserved. Chapter 2 Creating Applications with Visual Basic.
Microsoft Visual Basic 2012 CHAPTER FOUR Variables and Arithmetic Operations.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
Murach’s Visual Basic 2008, C7, modified or added© 2008, Mike Murach & Associates, Inc. Slide 1.
Making Interactive Programs with Visual Basic .NET
Visual Basic 2010 How to Program © by Pearson Education, Inc. All Rights Reserved.
Using Forms and Form Elements In Visual Basic.NET.
© 2006 Lawrenceville Press Slide 1 Chapter 4 Variables  A variable is a name for a value stored in memory.  Variables are created using a declaration.
Slide 1 Chapter 3 Variables  A variable is a name for a value stored in memory.  Variables are created using a declaration statement. For example: Dim.
 You won’t write a single line of program code.  Instead, you’ll use visual programming techniques.  Visual Studio processes your actions (such as mouse.
Microsoft Visual Basic 2010 CHAPTER FOUR Variables and Arithmetic Operations.
Visual Basic.NET Windows Programming
Egyptian Language School Computer Department
A variable is a name for a value stored in memory.
Visual Studio 2010 Hello World CSC 230.
Variables and Arithmetic Operations
3.01 Apply Controls Associated With Visual Studio Form
3.01 Apply Controls Associated With Visual Studio Form
Visual programming Chapter 3: GUI (Graphical User Interface) Part I
Chapter 2 Visual Basic Interface
Variables and Arithmetic Operations
مراحل كتابة البرنامج بلغة فيجول بيسك ستديو
Visual Studio 2010 Hello World CSC 230.
Please use speaker notes for additional information!
Chapter (3) - Looping Questions.
Building an Application in the Visual Basic .NET Environment
Fonts, TabControl, ListBox
Write a program that places the names of five different states in labels, and allows the user to enter guesses of the corresponding state capitals in textboxes.
Programming In Visual Basic.NET
STARTING OUT WITH Visual Basic 2008
Data Types Every variable has a given data type. The most common data types are: String - Text made up of numbers, letters and characters. Integer - Whole.
Understanding Buttons and TextBoxes
Custom Forms with VBA in Excel In-Class Exercise #11
Presentation transcript:

Addition Project CSIT 230 (Blum)

We designed a form as seen below with 2 Textboxes, 1 Button and 2 Labels CSIT 230 (Blum)

The TextBoxes The TextBoxes names were set to txtNumber1 and txtNumber2. The Font Size was set to 28 pt. The height of a TextBox is determined by the Font Size. The TextAlign property was set to Right. We expect the user to enter numbers and the convention is that numbers are right justified. CSIT 230 (Blum)

The Button The Button’s Name was set to btnPlus. The Font Size was set to 24 pt. The Text was set to “+”. CSIT 230 (Blum)

The First Label (the black line) We allowed it to have the default name Label1 since it will not be involved in any way with the interaction with the user or the coding thereof. We set AutoSize to False so that we could control the size of the label rather than having it controlled by the text it contains. We set the BackColor to Black. CSIT 230 (Blum)

The Second Label (for the answer) The Label’s name was set to lblSum. We set the AutoSize property to False. We set the BorderStyle to FixedSingle. We set the Font Size to 28 pt. We set the TextAlign property to MiddleRight. CSIT 230 (Blum)

First Attempt Our first attempt resulted in concatenation rather than addition. This makes some sense because what is expected to come from a TextBox is text and it makes sense to concatenate text. CSIT 230 (Blum)

Second Attempt The CInt() function converts the expression inside its parentheses to an integer (whole number). Now the + comes between two numbers and numerical addition is performed. CSIT 230 (Blum)

What happened when the user entered something that cannot be converted (cast) as a integer An “unhandled exception” is a fancy term for error. We will learn how to handle this exception and communicate the problem to the user. CSIT 230 (Blum)