Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.

Slides:



Advertisements
Similar presentations
Information System Design Lab 5&6. User Interface Design.
Advertisements

Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
CS0004: Introduction to Programming Visual Studio 2010 and Controls.
AA high level programming language. IIt is created by Microsoft. UUses a graphical environment called the Integrated Development Environment (IDE).
Creating an OOED Application
© by Pearson Education, Inc. All Rights Reserved.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
Chapter 6 Multiform Projects Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
A graphical user interface (GUI) is a pictorial interface to a program. A good GUI can make programs easier to use by providing them with a consistent.
Introduction to Visual Basic. What is Visual Basic? An environment for developing Windows applications Components –A GUI (Graphical User Interface - gooey)
Addison Wesley is an imprint of © 2011 Pearson Addison-Wesley. All rights reserved. Chapter 1 Introduction to Programming and Visual Basic.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Chapter 3 Introduction to Event Handling and Windows Forms Applications.
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.
Visual Basic Chapter 1 Mr. Wangler.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 8: More About OOP and GUIs.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
Java Programming, 3e Concepts and Techniques Chapter 3 Section 65 – Manipulating Data Using Methods – Java Applet.
An Introduction to Visual Basic
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
IE 411/511: Visual Programming for Industrial Applications
© 2006 Lawrenceville Press Slide 1 Chapter 3 Visual Basic Interface.
Java Software Solutions Lewis and Loftus Chapter 10 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Graphical User Interfaces --
PROBLEM SOLVING The first step in writing instructions to carry out a task is to determine what the output should be (What should the task produce?)
Chapter 8: Writing Graphical User Interfaces Visual Basic.NET Programming: From Problem Analysis to Program Design.
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
Basic Controls & Properties Chapter 2. Overview u VB-IDE u Basic Controls  Command Button  Label  Text Box  Picture Box u Program Editor  Setting.
CHAPTER TWO INTRODUCTION TO VISUAL BASIC © Prepared By: Razif Razali 1.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
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.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
What is Visual Basic.NET? 110 B-1 e.g. a word processor doesn’t do anything until the user clicks on a button, types text... A programming language that.
Topics Introduction Scene Graphs
CSC 157 (Blum)1 Hello World. CSC 157 (Blum)2 Start/Programs/Microsoft Visual Studio.NET 2003/Microsoft Visual Studio.NET 2003.
Copyright © 2011 Pearson Addison-Wesley What is a Program Made Of? Keywords (Reserved Words) – Words with special meaning that make up a high-level programming.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 – Graphical User Interfaces Java Foundations: Introduction to Programming.
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 13 GUI Programming.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 4: Events Programming with Alice and Java First Edition by John Lewis.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 14 Event-Driven Programming with Graphical User Interfaces.
MATLAB and SimulinkLecture 61 To days Outline Graphical User Interface (GUI) Exercise on this days topics.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Microsoft Visual C# 2010 Fourth Edition Chapter 3 Using GUI Objects and the Visual Studio IDE.
12-Jun-16 Event loops. 2 Programming in prehistoric times Earliest programs were all “batch” processing There was no interaction with the user Input Output.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Using Macros Lesson.
Programming Logic and Design Seventh Edition Chapter 12 Event-Driven GUI Programming, Multithreading, and Animation.
Dive Into® Visual Basic 2010 Express
Topics Graphical User Interfaces Using the tkinter Module
Visual Basic Code & No.: CS 218
Chapter Topics 15.1 Graphical User Interfaces
Event-driven programming
Chapter 8: Writing Graphical User Interfaces
Event loops 16-Jun-18.
1. Introduction to Visual Basic
Chapter 2 Visual Basic Interface
Event loops.
Event loops 17-Jan-19.
Topics Graphical User Interfaces Using the tkinter Module
Chapter 15: GUI Applications & Event-Driven Programming
Event loops 8-Apr-19.
Event loops.
Event loops 19-Aug-19.
Presentation transcript:

Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis Chapter 15: GUI Applications & Event-Driven Programming

Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 15-2 Chapter Topics 15.1 Graphical User Interfaces 15.2 Designing the User Interface for a GUI Program 15.3 Writing Event Handlers

Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Graphical User Interfaces A Graphical User Interface (GUI) allows the user to interact with the operating system and other programs using graphical elements such as icons, buttons, and dialog boxes –Much of the work of a GUI is done through dialog boxes, which are small windows that display information and allow the user to perform actions –In a command line interface, the programs determine the order in which things happen –In a GUI, the user can determine the order – this is called event driven

Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Graphical User Interfaces Figure 15-3 A GUI program

Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Graphical User Interfaces Creating a GUI Program –Most of the steps are the same –But, the programmer also designs the GUI elements that make up each window –This includes the flow from window to window Figure 15-4 A user interface flow diagram

Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Designing the User Interface for a GUI Interface GUI development also includes the program’s windows and all the graphical components –In the past, this was a cumbersome process –Newer languages allow for easier development Using Microsoft Visual Studio –Visual Basic –C++ –C# Using NetBeans and JBuilder –Java

Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Designing the User Interface for a GUI Interface Most IDE’s have a toolbox for easy development Figure 15-5 Visually constructing a window in Visual Basic

Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Designing the User Interface for a GUI Interface Components are items that appear in a program’s graphical user interface –Button: causes an action to occur when clicked –Label: can display text –Text Box: Allows the user to enter a single line of input –Check Box: Allows one or more options to be selected –Radio Button: Allows only one option to be selected –Combo Box: A dropdown list of items that the user can select an item from, or enter input –List Box: A list from which the user can select an item –Slider: Allows the user to select a value from a range

Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Designing the User Interface for a GUI Interface Figure 15-7 Various components in a GUI window

Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Designing the User Interface for a GUI Interface Component names are used to identify the components in the program, in the same way variable names are used Figure 15-8 Components and their names

Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Designing the User Interface for a GUI Interface Properties can be set on components to modify how it appears on the screen –Sets things like color, size, and position A summary of constructing a window –Sketch the window –Create the necessary components and name them –Set the components’ properties to the desired values

Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Writing Event Handlers Event handlers are written to control the GUI –After the windows are designed, event handlers are coded to respond to events when an action occurs, such as clicking a button –Event: an action that takes place within a program –Event handlers: a module that automatically executes when a specific event occurs

Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Writing Event Handlers How to write the event handler module Module ComponentName_EventName() The statements that appear here are executed when the event occurs. End Module //an event handler that closes a window Module exitButton_Click() Close End Module