Mark Dixon, SoCCE SOFT 131Page 1 03 – User Interface Design, and Sound and Graphics.

Slides:



Advertisements
Similar presentations
VISUAL BASIC Visual Basic is derived from the Basic language (Beginner’s All-Purpose Symbolic Instruction Code) Visual Basic uses an event-driven programming.
Advertisements

Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 11 Designing for Usability I.
Mark Dixon, SoCCE SOFT 131Page 1 22 – Visual BASIC 2005.
Mark Dixon, SoCCE SOFT 136Page 1 05 – Conditional Execution.
Mark Dixon, SoCCE SOFT 136Page 1 02 – Software Development Life-Cycle.
Mark Dixon Page 1 05 – Conditional Execution. Mark Dixon Page 2 Admin: Test (next week) In class test –teaching week 6 50 minutes short answer (5 - 6.
Mark Dixon, SoCCE SOFT 131Page 1 04 – Information Processing: Expressions, Operators & Functions.
Visual Basic Project Files:.VBP file: Project File: a small text file that contains the names of other files in the project, as well as some information.
Mark Dixon, SoCCE SOFT 131Page 1 SOFT – Module Introduction & Overview.
Visual Basic Project Files:.VBP file: Project File: a small text file that contains the names of other files in the project, as well as some information.
Mark Dixon Page 1 02 – Dynamic HTML (client-side scripting)
Mark Dixon, SoCCE SOFT 131Page 1 03 – Debugging & Graphics.
User Interface Design: Methods of Interaction. Accepted design principles Interface design needs to consider the following issues: 1. Visual clarity 2.
Mark Dixon, SoCCE SOFT 131Page 1 02 – Software Development Lifecycle, & User Interface Design.
Mark Dixon, SoCCE SOFT 131Page 1 SOFT – Module Introduction.
Using the Visual Basic Editor Visual Basic for Applications 1.
Slide 1 ICS 012 Visual Programming I Ahmed Esmat Second.
Mark Dixon, SoCCE SOFT 131Page 1 13 – Control Arrays & Container Controls.
Mark Dixon, SoCCE SOFT 131Page 1 03 – Debugging, Sound, and Graphics.
Mark Dixon, SoCCE SOFT 131Page 1 SOFT – Module Introduction & Overview.
1 Flash and Animation Presented by : Behzad Sajed Khosrowshahi.
Mark Dixon, SoCCE SOFT 131Page 1 02 – Software Development Lifecycle, & User Interface Design.
Chapter 3 Introduction to Event Handling and Windows Forms Applications.
Chapter 11 Adding Media and Interactivity. Flash is a software program that allows you to create low-bandwidth, high-quality animations and interactive.
Visual Basic Chapter 1 Mr. Wangler.
Chapter 3 Working with Symbols and Interactivity.
Multimedia ! Graphics ! Animation ! Sound Tip Of the Day 4 Tip of the Day: When using graphic methods at Form Load, the AutoRedraw property of the container.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
Using Visual Basic 6.0 to Create Web-Based Database Applications
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.
1-1 OBJ Copyright 2003, Paradigm Publishing Inc. Dr. Joseph Otto Silvia Castaneda Christopher deCastro CSULA Macromedia Flash MX Introduction.
© 2011 Delmar, Cengage Learning Chapter 3 Working with Symbols and Interactivity.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 4 I Need a Tour Guide.
Working with Symbols and Interactivity
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.
XP Tutorial 1 Introduction to Macromedia Flash MX 2004.
Mark Dixon, SoCCE SOFT 131Page 1 02 – Dynamic HTML (client-side scripting)
Copyright © 2001 by Wiley. All rights reserved. Chapter 2: Using Visual Basic to Create a First Project Getting Started with VB Development Environment.
 Application – another name for a program.  Interface – is what appears on the screen when the application is running.  Program Code – is instructions.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Mark Dixon, SoCCE SOFT 136Page 1 SOFT – Module Introduction & Overview.
Laboratory Exercise # 9 – Inserting Graphics to Documents Office Productivity Tools 1 Laboratory Exercise # 9 Inserting Graphics to Documents Objectives:
Chapter Two Creating a First Project in Visual Basic.
Mark Dixon Page 1 03 – Dynamic HTML (client-side scripting)
Mark Dixon Page 1 04 – Information Processing: Expressions, Operators & Functions.
User Interface Programming in C#: Direct Manipulation Chris North CS 3724: HCI.
Game Maker – Getting Started What is Game Maker?.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
Standard Grade Programming using VB 1 Programming Visual Basic.
Mark Dixon, SoCCE SOFT 131Page 1 02 – Dynamic HTML (client-side scripting)
Mark Dixon Page 1 03 – Dynamic HTML (client-side scripting)
Visual Basic CDA College Limassol Campus Lecture:Pelekanou Olga Semester C Week - 1.
Practical Programming COMP153-08S Week 5 Lecture 1: Screen Design Subroutines and Functions.
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.
Mark Dixon, SoCCE SOFT 131Page 1 16 – Visual BASIC 6.0.
Mark Dixon Page 1 04 – Information Processing: Expressions, Operators & Functions.
Microsoft Office 2008 for Mac – Illustrated Unit B: Getting Started with Mac OS X Leopard.
Mark Dixon 1 06 – Conditional Execution. Mark Dixon 2 Admin: Test (next week) In class test –teaching week 7 50 minutes short answer (5 - 6 words max)
Chapter 11 Adding Media and Interactivity. Chapter 11 Lessons Introduction 1.Add and modify Flash objects 2.Add rollover images 3.Add behaviors 4.Add.
Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi Chapter 2 Introduction to Visual Basic Programming Visual Basic.NET.
Chapter 3 I Need a Tour Guide (Introduction to Visual Basic 2010) Clearly Visual Basic: Programming with Visual Basic nd Edition.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
6. (supplemental) User Interface Design. User Interface Design System users often judge a system by its interface rather than its functionality A poorly.
1. Introduction to Visual Basic
Working with Symbols and Interactivity
Chapter 4 Enhancing the Graphical User Interface
Presentation transcript:

Mark Dixon, SoCCE SOFT 131Page 1 03 – User Interface Design, and Sound and Graphics

Mark Dixon, SoCCE SOFT 131Page 2 Session Aims & Objectives Aims –introduce you to the fundamentals of: good user-interface design, sound, and graphics Objectives, by end of this week’s sessions, you should be able to: –put bitmap (raster) graphics into your applications –draw simple vector graphics in your applications –play MP3 and WAV files in your applications

Mark Dixon, SoCCE SOFT 131Page 3 Example: disks & files

Mark Dixon, SoCCE SOFT 131Page 4 Human-Computer Interaction ‘Human-Computer Interaction (HCI) is about designing computer systems that support people so that they can carry out their activities productively and safely.’ Preece et al, 1994 (p. 1) three main concerns: –usefulness: is software functionality of use to user –usability: is software easy to use –learnability: is software easy to learn software may be: –‘simple to use, but of no value to me’ –‘really helpful, but awkward to use’ –‘really helpful, if only I could figure out how’

Mark Dixon, SoCCE SOFT 131Page 5 HCI – why bother? ‘The Day the Phones Stopped’ ( Preece et al, 1994 p. 25)

Mark Dixon, SoCCE SOFT 131Page 6 HCI - Design Guidelines Some issues: –Consistency –Fast feedback –Manage errors –Reduce cognitive load –User variety –User testing with actual users –…

Mark Dixon, SoCCE SOFT 131Page 7 Question: Address Book Which is best?

Mark Dixon, SoCCE SOFT 131Page 8 HCI - Direct Manipulation Direct Manipulation Interfaces (Shneiderman 1998, p. 205) –‘Continuous representation of the objects and actions [information] of interest with meaningful visual metaphors’ –‘Physical actions or presses of labelled buttons, instead of complex syntax’ –‘Rapid incremental reversible operations whose effect on the object of interest is visible immediately’

Mark Dixon, SoCCE SOFT 131Page 9 Example: Ball v2 - Design User interface design: Functional design: Trigger (when)Actions (what) click event of Right buttonmove ball character right click event of Left buttonmove ball character left click event of Up buttonmove ball character up click event of Down buttonmove ball character down click event of Centre buttonmove ball character to centre of form BallChar

Mark Dixon, SoCCE SOFT 131Page 10 Example: Ball v2 - Code Option Explicit Private Sub btnCentre_Click() picBallChar.Left = Me.ScaleWidth / 2 End Sub Private Sub btnRight_Click() picBallChar.Left = picBallChar.Left End Sub Properties (setting at run-time) –use code, assignment operator (=) –can change while program is running BallChar

Mark Dixon, SoCCE SOFT 131Page 11 Example: Holiday User Requirement –‘I want a cheap holiday, so I need to know times and prices of ferries and flights’ Can solve this by –visit company offices –phone –www, compare the following: Brittany Ferries EasyJet

Mark Dixon, SoCCE SOFT 131Page 12 Types of Graphics: Raster Raster graphics – made of dots (pixels – picture elements) –stored in.jpg,.bmp, and.gif files –suitable for complex, static pictures (e.g. photos) –difficult to change programmatically –loses quality when enlarged:

Mark Dixon, SoCCE SOFT 131Page 13 Types of Graphics: Vector Vector graphics – made of objects (lines, circles, etc.) –suitable for simple, dynamic pictures (diagrams) –No loss of quality when enlarged

Mark Dixon, SoCCE SOFT 131Page 14 Example: PicView - Analysis SPECIFICATION User Requirements –display photos quickly and easily one after another Software Requirements –Functional: –change current folder and drive –display list of picture files in current folder –display picture (*.jpg, *.bmp, and *.gif) from files in current folder –Non-functional should be quick and easy to use PicView

Mark Dixon, SoCCE SOFT 131Page 15 Controls Picture Box: display pictures Drive List Box: allow user to select disk drive Directory List Box: allow user to select folder File List Box: allow user to select file

Mark Dixon, SoCCE SOFT 131Page 16 Controls' Properties Picture Box (pic) –Picture: allows display of bitmap (raster graphic) as background Drive List Box (drv) –Drive: the currently selected disk drive Directory List Box (dir) –Path: the currently selected directory (folder) File List Box (fil) –Path: the currently selected folder/directory –Pattern: only display this type of file (e.g..jpg) –FileName: the currently selected file

Mark Dixon, SoCCE SOFT 131Page 17 Example: PicView - Design User interface design: Functional design: Trigger (when)Actions (what) click event of Drive Boxmake drive current (directory box points to this drive) click event of Directory Boxmake folder current (file box points to this folder) click event of File Boxdisplay selected picture in picture box

Mark Dixon, SoCCE SOFT 131Page 18 Example: PicView - Code Option Explicit Private Sub drvMain_Change () dirMain.Path = drvMain.Drive End Sub Private Sub dirMain_Change () filMain.Path = dirMain.Path End Sub Private Sub filMain_Click () picMain.Picture = LoadPicture(filMain.Path & "\" & filMain.FileName) End Sub drvMain dirMain picMain filMain

Mark Dixon, SoCCE SOFT 131Page 19 Vector Graphics: Grid System the origin (position 0,0) is at top left –in mathematics it is always bottom left

Mark Dixon, SoCCE SOFT 131Page 20 Picture Box: Drawing Methods Methods (vector graphics) –Line: draws a straight line between 2 points –Circle: draws a circle –PSet: draws a dot (point) –Cls: clears (screen) drawing area

Mark Dixon, SoCCE SOFT 131Page 21 Example: Shapes Form and Picture Box control support graphics methods: picDisplayArea.Line (500, 200)-(1900, 800) picDisplayArea.Line -(2600, 600) picDisplayArea.Line -Step(-600, -400) picDisplayArea.PSet (1500, 1000) picDisplayArea.Circle (700, 900), 300 Shapes

Mark Dixon, SoCCE SOFT 131Page 22 Example: StickMan Enabled property (true or false) StickMan

Mark Dixon, SoCCE SOFT 131Page 23 Example: Face Face

Mark Dixon, SoCCE SOFT 131Page 24 Example: Door Private Sub btnDoor_Click() picDoor.Cls picDoor.Line (200, 200)-(1300, 1800), vbRed, BF picDoor.Line (200, 200)-(1300, 1800), vbBlack, B picDoor.Line (300, 300)-Step(300, 600), vbGreen, BF picDoor.Line picDoor.FillColor = vbYellow picDoor.FillStyle = vbSolid picDoor.Circle (1150, 900), 100, vbBlue End Sub you need to fill these lines in

Mark Dixon, SoCCE SOFT 131Page 25 Additional Controls VB has hundreds of controls To include additional controls in your project: –Project menu –Components item Multimedia Control –plays MP3 & WAV files

Mark Dixon, SoCCE SOFT 131Page 26 Multimedia Controls' Properties Multi-media Control –FileName: name of file to play –Command: controls playback

Mark Dixon, SoCCE SOFT 131Page 27 Example: Ball v3 - Code Properties (setting at run-time) –use code, assignment operator (=) –can change while program is running BallChar Private Sub picBallChar_Click() mmcNoise.Command = "Close" mmcNoise.FileName = "Fart.wav" mmcNoise.Command = "Open" mmcNoise.Command = "Play" End Sub mmcNoise

Mark Dixon, SoCCE SOFT 131Page 28 Example: Music Player - Analysis User Requirement: –to play different music for long time without interruption, at same location (while working or at party) Software Requirements Specification software should: –allow user to: select track (MP3 file) from folder on disk play selected track –automatically move to next track in folder go back to first after last has played later lecture

Mark Dixon, SoCCE SOFT 131Page 29 Example: Music Player - Design Compare the following User Interface Designs: V0 V1

Mark Dixon, SoCCE SOFT 131Page 30 Example: Music Player - Code Option Explicit Private Sub drvMain_Change() dirMain.Path = drvMain.Drive End Sub Private Sub dirMain_Change() filMain.Path = dirMain.Path End Sub Private Sub filMain_Click() mmcMain.Command = "Close" mmcMain.FileName = filMain.Path & "\" & filMain.FileName mmcMain.Command = "Open" End Sub drvMaindirMain filMainmmcMain

Mark Dixon, SoCCE SOFT 131Page 31 Run your program (F5), or Step through line by line (F8) Immediate Window: code executed immediately VB6 IDE: Debugger Run Pause Stop

Mark Dixon, SoCCE SOFT 131Page 32 VB6 IDE: Help System F1 key –when control selected –when code selected Gives help about what was selected Not tutorial A reference

Mark Dixon, SoCCE SOFT 131Page 33 Tutorial Exercise: PicView Task 1: Get the BallChar v2 example (from the lecture) working. Task 2: Get the PicView example (from the lecture) working. Task 3: Get the StickMan example (from the lecture) working. Task 4: Get the BallChar v3 example (from the lecture) working. Task 3: Get the Music Player example (from the lecture) working. Task 5: Modify your program to automatically start playing a track once it is clicked. Task 6: Modify your program to automatically go the next track after the current one ends. Task 7: Modify your program to include a progress bar that shows the current position in a playing track (You will need to use the help system)