Chapter 8: Writing Graphical User Interfaces Visual Basic.NET Programming: From Problem Analysis to Program Design.

Slides:



Advertisements
Similar presentations
What Was I Thinking??. Key Terms 1. Control 1. Control 2. Design Mode 2. Design Mode 3. Event 3. Event 4. Form 4. Form 5. Interface 5. Interface 6. Properties.
Advertisements

Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
Exploring Microsoft Access Chapter 8 Creating More Powerful Applications: Introduction to VBA By Robert T. Grauer Maryann Barber.
IS 1181 IS 118 Introduction to Development Tools VB Chapter 03.
Exploring Office Grauer and Barber 1 Creating More Powerful Applications: Introduction to VBA(Wk9)
A Guide to Oracle9i1 Creating an Integrated Database Application Chapter 8.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Chapter 13: Advanced GUI and Graphics
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
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.
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
Tutorial 6 Using Form Tools and Creating Custom Forms
Microsoft Visual Basic 2005: Reloaded Second Edition
Microsoft Visual Basic 2008 CHAPTER 8 Using Procedures and Exception Handling.
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.
Chapter 8: Writing Graphical User Interfaces
© 2006 Lawrenceville Press Slide 1 Chapter 3 Visual Basic Interface.
CHAPTER TWO Creating Simple Visual Basic.NET Windows Applications.
Java Software Solutions Lewis and Loftus Chapter 10 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Graphical User Interfaces --
Chapter 5 Menus, Common Dialog Boxes, and Methods Programming in C#.NET © 2003 by The McGraw-Hill Companies, Inc. All rights reserved.
Chapter 3 – Fundamentals of Programming in VB.NET VB.NET Controls VB.NET Events Numbers Strings Input and Output.
Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 2 Creating a User Interface.
Introduction to Visual Basic.NET Chapter 2 Introduction to Controls, Events.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Introduction to Visual Basic.NET Your First Visual Basic.NET Application.
Chapter 2 –Visual Basic, Controls, and Events
Chapter Two Designing Applications Programming with Microsoft Visual Basic th Edition.
Chapter Two Creating a First Project in Visual Basic.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
Exploring Microsoft Access Chapter 8 Creating More Powerful Applications: Introduction to VBA.
Microsoft Access 2010 Chapter 8 Advanced Form Techniques.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
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.
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.
1.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Chapter 3 - VB.NET by Schneider1 Chapter 3 – Fundamentals of Programming in VB.NET Part I VB.NET Controls VB.NET Events.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 – Graphical User Interfaces Java Foundations: Introduction to Programming.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 5.1 Test-Driving the Inventory Application.
Object-Oriented Application Development Using VB.NET 1 Chapter 10 VB.NET GUI Components Overview.
Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al- ajmi Chapter 3 Some Visual Basic Controls and Events Visual Basic. NET.
CMPF114 Computer Literacy Chapter 3 The Visual Basic Environment 1.
Microsoft Visual Basic 2008: Reloaded Third Edition Chapter One An Introduction to Visual Basic 2008.
Visual Basic.NET BASICS Lesson 11 List Boxes, For Next Loops, and Label Settings.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 14 Event-Driven Programming with Graphical User Interfaces.
Visual Basic.NET BASICS Lesson 14 Menus and Printing.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 2 The Visual Basic.NET Integrated Development Environment.
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
Programming with Visual Basic.NET. Quick Links Program Code The Code Window The Event Procedure Assignment Statements Using AutoList Radio Buttons Buttons.
Visual Basic.NET BASICS Lesson 9 Nested If Statements and Radio Buttons.
Course ILT Using complex selection structures Unit objectives Include radio buttons and check boxes in an interface, create and call a user- defined Sub.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
CSIT 108 Review Visual Basic.NET Programming: From Problem Analysis to Program Design.
Visual Basic.NET Windows Programming
Microsoft Visual Basic 2005: Reloaded Second Edition
Chapter Topics 15.1 Graphical User Interfaces
Chapter 8: Writing Graphical User Interfaces
DB Implementation: MS Access Forms
CIS16 Application Development Programming with Visual Basic
DB Implementation: MS Access Forms
Chapter 15: GUI Applications & Event-Driven Programming
Presentation transcript:

Chapter 8: Writing Graphical User Interfaces Visual Basic.NET Programming: From Problem Analysis to Program Design

Visual Basic.NET Programming: From Problem Analysis to Program Design2

3

4

5 Understanding the Code Generated by the Windows Form Designer Use drag-and-drop features of Windows Form Designer to create GUIs Visual programming consists of: –Creating a form –Setting its properties –Adding components –Setting component properties –Adding event handling code

Visual Basic.NET Programming: From Problem Analysis to Program Design6 Understanding the Code Generated by the Windows Form Designer (continued) VB.NET generates code that handles details of form design –Specifies attributes and methods that make form work When creating a form: –Most generated code collapsed under heading “Windows Form Designer generated code” Begins with #Region directive Ends with #End Region directive –View by clicking expand node –Generated code is complex

Visual Basic.NET Programming: From Problem Analysis to Program Design7

8 Exploring the FormDemo Program (continued) Private keyword –Indicates that method is accessible only within own class Me keyword –Refers to current object Parameter list –Identifies variables that receive values when method invoked

Visual Basic.NET Programming: From Problem Analysis to Program Design9 Exploring GUI Design Principles Standards that guide creative process of user interface design Basic principles include: –Creating consistent look and feel –Ensuring ease of use –Minimizing data entry errors –Providing feedback to users –Adhering to standard naming conventions

Visual Basic.NET Programming: From Problem Analysis to Program Design10 Creating a Consistent Look and Feel Look and feel –Style and appearance of form –Includes choice of colors and fonts for various controls Key design goal –Provide consistent look and feel as user moves among various forms

Visual Basic.NET Programming: From Problem Analysis to Program Design11 Ensuring Ease of Use and Minimizing Data-Entry Errors Purpose of each control and layout of form should be intuitive Placement and grouping of controls should be logical Good practice: –Design input forms to minimize required keystrokes

Visual Basic.NET Programming: From Problem Analysis to Program Design12 Providing Feedback to the User Provide feedback to user –When certain actions have been completed –To inform user when data entry errors have occurred Present feedback in consistent manner

Visual Basic.NET Programming: From Problem Analysis to Program Design13 Naming Conventions Adhering to set of naming conventions –Improves program readability –Facilitates program maintenance Assign meaningful variable names –Change Name property for each control Variable name should reflect both –Type of control –Purpose of control

Visual Basic.NET Programming: From Problem Analysis to Program Design14

Visual Basic.NET Programming: From Problem Analysis to Program Design15

Visual Basic.NET Programming: From Problem Analysis to Program Design16 Handling Events Forms are event-driven: the user has to do something (take an action) for an event to happen (e.g. calculate, display) To create event handling procedure: –Double-click control in Forms Designer window –VB.NET places method header in Code window –Add statements that handle event –Code is added to most commonly used event handler for control See Ex. 8-1

Visual Basic.NET Programming: From Problem Analysis to Program Design17 Working with Additional GUI Controls Other commonly used controls: –Text boxes: See Ex. 8-2 –Combo boxes –Check boxes –Radio buttons

Visual Basic.NET Programming: From Problem Analysis to Program Design18 Using Text Boxes and Combo Boxes Text box –Used to display textual information –Enable inputting of text from keyboard –Property Text: identifies the text contained in the text box Combo box –Extends functionality of text box –Provides ability to select item from predetermined list of values Can also type value –Property Text: identifies the text that is displayed by default in the combo box

Visual Basic.NET Programming: From Problem Analysis to Program Design19

Visual Basic.NET Programming: From Problem Analysis to Program Design20 Using Check Boxes and Radio Buttons Check boxes and radio buttons provide ability to select from options States: –Checked/Selected –Unchecked/Not selected Check box –Appears as small white box –Usually includes label that identifies purpose See Ex. 8-4

Visual Basic.NET Programming: From Problem Analysis to Program Design21

Visual Basic.NET Programming: From Problem Analysis to Program Design22 Using Radio Buttons Radio buttons –Appear as small white circles –Have captions that identify purpose Group of radio buttons –Represents set of related options –Options are mutually exclusive

Visual Basic.NET Programming: From Problem Analysis to Program Design23

Visual Basic.NET Programming: From Problem Analysis to Program Design24

Visual Basic.NET Programming: From Problem Analysis to Program Design25