Chapter 4 Enhancing the Graphical User Interface

Slides:



Advertisements
Similar presentations
Windows Basics An Introduction to the Windows Operating System.
Advertisements

Using Macros and Visual Basic for Applications (VBA) with Excel
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Creating Custom Forms. 2 Design and create a custom form You can create a custom form by modifying an existing form or creating a new form. Either way,
 2002 Prentice Hall. All rights reserved. Chapter 2 - Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Overview of the Visual Studio.NET.
Copyright 2007, Paradigm Publishing Inc. POWERPOINT 2007 CHAPTER 1 BACKNEXTEND 1-1 LINKS TO OBJECTIVES Create Presentation Open, Save, Run, Print, Close,Delete.
A Guide to Oracle9i1 Creating an Integrated Database Application Chapter 8.
MENUS AND THE MENU EDITOR Elements of a Menu Menu bar Menu title Separator bar Menu items.
Introduction to Visual Basic What it is, and a simple program Mike Thelwall University of Wolverhampton, UK.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Word Project 8 Working with Macros and Visual Basic for Applications (VBA)
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Microsoft Visual Basic 2005 ENRICHMENT CHAPTER Visual Studio Tools for Office.
Getting Started with Application Software
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 4 1 Microsoft Office FrontPage 2003 Tutorial 4 – Using Shared Borders and Themes.
IE 411/511: Visual Programming for Industrial Applications
Appendices A - F A-F Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Lecture #2: Using your computer Learning about the Windows XP Operating System.
Automating Database Processing Chapter 6. Chapter Introduction Design and implement user-friendly menu – Called navigation form Macros – Automate repetitive.
Microsoft Visual Basic 2005 ENRICHMENT CHAPTER Visual Studio Tools for Office.
Chapter 2 - More Controls More controls – Text boxes - used for user input – Frames - containers to group items – check boxes - user select an option -
Enhancing the Graphical User Interface Multiple Forms, Controls, and Menus.
Computing Fundamentals Module Lesson 3 — Changing Settings and Customizing the Desktop Computer Literacy BASICS.
Copyright © 2010 Wolters Kluwer Health | Lippincott Williams & Wilkins Introduction to Windows Chapter 2.
Chapter Two Creating a First Project in Visual Basic.
Visual Basic.NET BASICS Lesson 1 A First Look at Microsoft Visual Basic.NET.
Chapter 2 – Introduction to the Visual Studio .NET IDE
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
Visual Basic CDA College Limassol Campus Lecture:Pelekanou Olga Semester C Week - 1.
Visual Basic Programming Introduction VB is one of the High level language VB has evolved from the BASIC language. BASIC stands for Beginners All-purpose.
Lesson 1 - Understanding the Word Window and Creating a New Document
 2002 Prentice Hall. All rights reserved. 1 Chapter 2 – Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Visual Studio.NET Integrated.
CMPF114 Computer Literacy Chapter 3 The Visual Basic Environment 1.
Agency Web Site Navigation Structure. Building the agency web site Agency Web Site Navigation Structure, Slide 2Copyright © 2004, Jim Schwab, University.
Object-Oriented Application Development Using VB.NET 1 Chapter 2 The Visual Studio.NET Development Environment.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 6 1 Microsoft Office Access 2003 Tutorial 6 – Creating Custom Forms.
TOOLBOX. The Toolbox Intrinsic Controls - always included in the Toolbox ActiveX Controls - separate files with ocx file extension Insertable Objects.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
XP New Perspectives on Creating Web Pages With Word Tutorial 1 1 Creating Web Pages With Word Tutorial 1.
Chapter 11 Enhancing an Online Form and Using Macros Microsoft Word 2013.
Fundamentals of Windows Mouse n 4 Basic Operations: –Pointing –Clicking –Double Clicking –Dragging.
Dive Into® Visual Basic 2010 Express
Computer Literacy BASICS
Getting Started with Application Software
Working in the Forms Developer Environment
Chapter 1: An Introduction to Visual Basic 2015
Visual Basic Code & No.: CS 218
Introduction to Computer CC111
Building a User Interface with Forms
Chapter 2 – Introduction to the Visual Studio .NET IDE
Lesson 2 Tables and Charts
1. Introduction to Visual Basic
Introduction to the Visual C# 2005 Express Edition IDE
VB 6.0.
Program and Graphical User Interface Design
Module 1: Getting Started with Windows 95
Microsoft Office Access 2003
Visual Basic.
Microsoft Office Access 2003
Chapter 2 – Introduction to the Visual Studio .NET IDE
Windows xp PART 1 DR.WAFAA SHRIEF.
P.J.Balakumaran, AP, Commerce CA, SNMV CAS
Grauer and Barber Series Microsoft Access Chapter Two
PowerPoint Lesson 1 Microsoft Word Basics
Overview of the IDE Visual Studio .NET is Microsoft’s Integrated Development Environment (IDE) for creating, running and debugging programs (also.
Chapter 4 Enhancing the Graphical User Interface
An Introduction to the Windows Operating System
Presentation transcript:

Chapter 4 Enhancing the Graphical User Interface Exploring Microsoft Visual Basic 6.0 4 Chapter 4 Enhancing the Graphical User Interface Multiple Forms, Controls, and Menus Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. Objectives 1. How to design a good user interface 2. Use Toolbox tools to create and modify forms and controls 3. Multiple Document Interface (MDI) vs. Single Document Interface (SDI) vs. Explorer-style interface 4. Create input features such as text boxes, labels and command buttons Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. Objectives 5. Include graphics using picture box or image controls 6. Create a Graphical User Interface with menus 7. Include file management features using drive list boxes, directory list boxes and file list boxes 8. Include frames, check boxes, option buttons, combo boxes, and list boxes Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. Designing the GUI Interface Styles Multiple Document Interface (MDI) Single Document Interface (SDI) Explorer-style interface Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Multiple Document Interface Parent Form Child Form Child Form Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Single Document Interface Independent Form Independent Form Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Explorer-style interface Left pane browsing controls Right pane detailed view Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Five Principles of GUI Design Principle 1: Know Your End User Principle 2: Be Consistent Principle 3: Show and Use Informative Graphics and Messages Principle 4: Keep It Simple Principle 5: Let the User Control the Application Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Principle 1: Know Your End User Who is my audience? Will be used by children, adults or both? What is reading level of users? If retired adults, use large font. Write down as much as you know about your end user before beginning design. Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Principle 2: Be Consistent Use Windows Guidelines - Close button Windows standard fonts - Arial, Times New Roman, and MS Sans Serif Establish font color and size, background color, and foreground color Use menus and standard menu positions See Appendix D - Standard Menus for Windows Applications Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Principle 3: Show and Use Informative Graphics and Messages Show user, instead of telling Use informative graphics, instead of merely creative graphics Graphics especially useful for international applications GUI analogy - dashboard of car Use symbols, not words Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Principle 4: Keep It Simple KISS “Keep it simple sweetie” If interface looks difficult, it will be hard to use Use several forms instead of a single cluttered form Group items, use tabbed format Set default options for user Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Principle 5: Let the User Control the Application Conversation between computer and end user Let end user decide tasks and order Programmer controls computer’s responses to end user Visual Basic is event-driven so this is relatively easy to achieve Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. Form Designer Grid See Appendix C - The Toolbox, Toolbars, and Controls Twips - screen-independent unit Pixels - picture elements, screen-dependent unit Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

The Learning Arithmetic Project Game to practice addition, subtraction, multiplication and division skills Numbers from 0 to 9 Child in grade 3, 4 or 5 Give feedback to child Use Window Calculator accessory as model Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

GUI Enhancement with the Learning Arithmetic Project Hands-On Exercise 1 Use the Application Wizard Save your forms and project files Modify the Splash form Add the Calculator form Add the Bears form Write the Module code Run and test the project Debug your project Print your project and exit Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. The Toolbox Intrinsic Controls - always included in the Toolbox ActiveX Controls - separate files with ocx file extension Insertable Objects - objects from another application such as a spreadsheet, or document Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. Intrinsic Controls Pointer tool Picture box Label Text box Frame Command button Check box Option button Combo box List box Horizontal scroll bar Vertical scroll bar Timer Drive list Directory list box File list box Shape Line Image OLE container Data Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. Get Input Text box - text input Horizontal Scroll bars - navigate choices Vertical Scroll bars - navigate choices Check box - more than one choice Option buttons - mutually exclusive choices List box - 1 choice from list Combo box - choose or type a choice Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. Get Input Tabbed dialog - present many options MsgBox function - prompt user or display message InputBox function - present predefined dialog boxes Common dialog - display standard dialog boxes such as Open, Save and Print Customized dialog box - create your own Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. Display Graphics Image - use to create an icon command button, decorative images Picture box - use to create a toolbar Line - draw a straight line segment Shape - draw a rectangle, square, ellipse, or circle Background Property - background image LoadPicture function - use at runtime Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. File System Controls Drive list box - display list of disk drives Directory list box - display list of folders (directories) and paths File list box - display list of files Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Miscellaneous Controls Frame - use to group controls together Timer - use to trigger simple animations or like a stopwatch OLE container - use to link or embed objects from other applications Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. Data Access Controls Data Control display, edit and update data from existing databases uses same database engine that powers Microsoft Access Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Set Properties with Code name.property = setting Where name is the name of the control or form . (period) is required property is the property to set or modify = is required setting is the setting of the property Examples: imgWorld.Visible = True txtName.Text = “Sarah” Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Create the Icon Explorer Project using File System Controls Hands-On Exercise 2 Create a new project Add the existing starter form Add a Splash form Add the Main module Modify the Main form Code the Main form Run and debug the project Add code to display icons Run and debug the new code Print your project and exit Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. Elements of a Menu Menu bar Menu title Menu items Separator bar Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. The Menu Editor Menu control properties Menu title Menu control list box Menu items Separator bar Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Setting Properties for Menu Commands Name property - assigns the name used to refer to the menu control in your code Enabled property - menu control appears dimmed (grayed out) when not enabled Caption property - assigns the command to display on the menu bar or submenus Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Menus and the Menu Editor Access key - underlined keyboard alternative to a menu command - Press Alt + key Shortcut key - assigned to most frequently used menu items - Press Ctrl + key Separator Bar - divides menu items into logical groupings Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. Menu Design Use short menu names, single word Use unique menu items for each menu Group menus logically Choose a logical access key for menu items Choose logical keyboard shortcuts for most commonly used commands Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Add Menus to the Learning Arithmetic Project Hands-On Exercise 3 Open the Learning Arithmetic project Save project files with a new name Add menu titles Add menu items Modify the About form Add the HowTo form and controls Add code to activate the menus Test the menus and forms Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. Summary ... Design GUIs using 5 basic design principles 1. Know your end user 2. Be consistent 3. Use informative graphics and messages 4. Keep it simple 5. Let the user control the application Design GUI on paper first Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Copyright 1999 Prentice-Hall, Inc. Summary Add controls to forms using tools from the toolbox Intrinsic controls are always in the toolbox ActiveX controls and Insertable Objects can be added to the toolbox Use the Menu Editor to add menus Add code to activate the menus Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Practice with Visual Basic 1. Controls Demonstration Sample 2. MDI vs. SDI Interface Style 3. A Successful Windows Application 4. Graphic Explorer Project 5. My Calendar Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc.

Chapter 4 - Enhancing the Graphical User Interface Exploring Microsoft Visual Basic 6.0 Case Studies Create a Prototype Insertable Objects ActiveX Controls Controls from the Web Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc. Copyright 1999 Prentice-Hall, Inc.