COM148X1 Interactive Programming Lecture 7. Topics Today HCI Event Handling.

Slides:



Advertisements
Similar presentations
Operating-System Structures
Advertisements

User Modeling CIS 376 Bruce R. Maxim UM-Dearborn.
Graphical User Interfaces 1. User interface Allows a user to interact with a computer. GUI Graphical user interface allows the user to use a mouse to.
1 Official Interface Guidelines by David Catmull User interface documentation published by Apple and Microsoft.
CA 121 Intro to Programming Tariq Aziz and Kevin Jones GUI Programming in Visual Studio.NET Chapter 1 Tariq Aziz and Kevin Jones.
Compunet Corporation Programming with Visual Studio.NET GUI Week 13 Tariq Aziz and Kevin Jones.
Exploring the Basics of Windows XP. Objectives Start Windows XP and tour the desktop Explore the Start menu Run software programs, switch between them,
Multiple Forms & Procedures. Form Methods: –Show, Hide, Activate, Close Events: –Load, Activated, Closing, Closed.
Events. Events Single Event Handlers Click Event Mouse Events Key Board Events Create and handle controls in runtime Outline.
Compunet Corporation Programming with Visual Basic.NET GUI Week # 11 Tariq Ibn Aziz.
WINDOWS XP BACKNEXTEND 1-1 LINKS TO OBJECTIVES Starting Windows Using the Taskbar, opening & switching programs Using the Taskbar, opening & switching.
Copyright 2007, EMC Paradigm Publishing Inc. WINDOWS XP BACKNEXTEND 1-1 LINKS TO OBJECTIVES Starting Windows Using the Taskbar, opening & switching programs.
File Management and Organisation © Copyright William Rowan 2007.
Chapter 2 –Visual Basic, Controls, and Events
Programming Paradigms Imperative programming Functional programming Logic programming Event-driven programming Object-oriented programming A programming.
CS0004: Introduction to Programming Events. Review  Event Procedure  A set of instructions to be executed when a certain event happens.  Many event-driven.
Microsoft Visual Basic 2012 CHAPTER TWO Program and Graphical User Interface Design.
Visual Basic Fundamental Concepts. Integrated Development Enviroment Generates startup form for new project on which to place controls. Features toolbox.
Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project.
1 Visual Basic for Applications (VBA) for Excel Prof. Yitzchak Rosenthal.
CSCI 3327 Visual Basic Chapter 10: Windows Forms GUI: A Deeper Look UTPA – Fall 2011.
Chapter 8: Writing Graphical User Interfaces
CSC 298 Windows Forms.
AS Level ICT Selection and use of appropriate software: Interfaces.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Typing Application Introducing Keyboard Events, Menus, Dialogs and the Dictionary.
With Windows 7 Introductory© 2011 Pearson Education, Inc. Publishing as Prentice Hall1 Windows 7 Introductory Chapter 2 Managing Libraries Folders, Files.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 4 I Need a Tour Guide.
Lecture 5: Interaction 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 711,  ex 2271 
Chapter 3 – Fundamentals of Programming in VB.NET VB.NET Controls VB.NET Events Numbers Strings Input and Output.
Chapter 8: Writing Graphical User Interfaces Visual Basic.NET Programming: From Problem Analysis to Program Design.
Visual Basic 2005 CHAPTER 2 Program and Graphical User Interface Design.
Introduction to Visual Basic.NET Chapter 2 Introduction to Controls, Events.
Basic Computer and Word Functions, part 1 Read the information and use to answer the questions in the Basic Computer and Word Functions Study Guide.
Lecture Set 13 Drawing Mouse and Keyboard Events Part B – Mouse and Keyboard Events.
VB Procedures. Procedures. Sub procedure: Private/Public Sub SubName(Arguments) … End Sub Private: Can only be accessed by procedures in the same form.
Copyright © 2010 Wolters Kluwer Health | Lippincott Williams & Wilkins Introduction to Windows Chapter 2.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 12 - Graphical User Interface Concepts: Part.
Output Design. Output design  Output can be: Displayed on a screen/VDU/monitor. Printed on paper as hard copy. Sound.
Timer, Animation Responding to Mouse & Keyboard Lab 7 7 McGraw-Hill© 2006 The McGraw-Hill Companies, Inc. All rights reserved.
Visual Basic 2005 CHAPTER 2 Program and Graphical User Interface Design.
® Microsoft Office 2010 Exploring the Basics of Microsoft Windows 7.
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.
Chapter 3 - VB.NET by Schneider1 Chapter 3 – Fundamentals of Programming in VB.NET Part I VB.NET Controls VB.NET Events.
Computing Fundamentals Module Lesson 7 — The Windows Operating System Computer Literacy BASICS.
Microsoft Visual Basic 2010 CHAPTER TWO Program and Graphical User Interface Design.
Yonglei Tao School of Computing & Info Systems GVSU Ch 7 Design Guidelines.
Created by Alia Al-Abdulkarim 2008 Visual Basic Vs. Java.
Creating Menus Menu Bar – behaves like standard Windows menus Can be used in place of or in addition to buttons to execute a procedure Menu items are controls.
Michael Olivero Microsoft Student Ambassador for FIU Pick up your free drink below to your left. 1 per person please.
 2002 Prentice Hall. All rights reserved. 1 Outline Mouse Event Handling Keyboard Event Handling Graphical User Interface Concepts:
CIS 338: Events Dr. Ralph D. Westfall April, 2011.
 ASP.NET provides an event based programming model that simplifies web programming  All GUI applications are incomplete without enabling actions  These.
COM148X1 Interactive Programming Lecture 8. Topics Today Review.
Implement User Input Windows Development Fundamentals LESSON 2.4A.
1 Using jQuery JavaScript & jQuery the missing manual (Second Edition)
Chapter 7 Multiple Forms, Modules, and Menus. Section 7.2 MODULES A module contains code—declarations and procedures—that are used by other files in a.
Dr. Abraham Professor UTPA Graphical User Interface.
Copyright 2007, EMC Paradigm Publishing Inc. WINDOWS VISTA BACKNEXTEND 1-1 LINKS TO OBJECTIVES Starting Windows Using the Taskbar, open & switch programs.
Office 2016 and Windows 10: Essential Concepts and Skills
Visual Basic Fundamental Concepts
Chapter 8: Writing Graphical User Interfaces
Program and Graphical User Interface Design
Introduction to VB programming
Program and Graphical User Interface Design
Exploring the Basics of Windows XP
Web Development Using ASP .NET
Chapter 13: Handling Events
Event loops.
Overview of the IDE Visual Studio .NET is Microsoft’s Integrated Development Environment (IDE) for creating, running and debugging programs (also.
GUI Programming in Visual Studio .NET
Presentation transcript:

COM148X1 Interactive Programming Lecture 7

Topics Today HCI Event Handling

HCI

What is HCI HCI stands for Human Computer Interaction, it is a field of study of designing user-friendly computer interface There are different guidelines available included Apple, Microsoft … etc. What is going to reference mainly from the guidelines provided from Apple

User Interface Design Use metaphors to present the concepts and features of the application Folder icon represents a directory in file system Recycle Bin icon represents useless files places Reflect users’ mental model, satisfy users’ expectation of what to do and what to get Familiarity Simplicity Availability Discoverability

User Interface Design (cont’) Choose explicit action (e.g. show the command of selected object in menu) and implied action (e.g. drag a document icon to word processor) to match users’ expectation Make user have a feeling of manipulating the data directly Allow users to rearrange the play-list of media player by drag and drop operation

User Interface Design (cont’) Provide different level of controls to different level of users (novice to expert) Provide feedback for users Show progress when application is going to take a lengthy operation Consistence control among other applications Windows’ close button always appears in top-right corner

User Interface Design (cont’) WYSIWYG (What Is See Is What You Get), keep the output consistency among different output devices Allow users to undo their actions or warn them if something is going to change irreversible Keep the user interface consist for the whole application Make the disabled menu items dimmer instead of hide them away from user

User Interface Design (cont’) Keep user interface “good” looking Use high resolution icons Use anti-alias fonts Use large enough font size Use model forms as less as possible (forms force focus on themselves such as alert windows) Last but not the least, simple is good

Test User Interface Create prototype is a way to test if the user satisfy the user interface design In prototype, the program not necessary truly do the job but it should be able to demonstrate the workflow when the application completed

Event Handling

Event An event is an action which programmer can handle in code An event can be generated by User (clicking a button) System (timer completed count down) Programmer (change the attribute of control) In VB, different control expose different set of event for programmer to handle

Event Handler Event handler is the program which handle specific event(s)

Create Event Handler Step 1: in code view, select the control which generates event

Create Event Handler (cont’) Step 2: select the event of the control

Create Event Handler (cont’) Step 3: add code to handle the event

Event Argument The details of event is store in the EventArgs parameter Different event will generate different kinds of EventArgs Example of EventArgs EventArgs (no details provided) MouseEventArgs KeyEventArgs

MouseEventArgs Store the detail for MouseUp, MouseDown and MouseMove event X – x coordinate of the mouse Y – y coordinate of the mouse Button – mouse button pressed Clicks – number of time the button was clicked Delta – the count of mouse wheel rotated

KeyEventArgs Store the details of KeyUp and KeyDown event Alt – indicate if Alt key was pressed Control – indicate if Ctrl key was pressed Shift – indicate if Shift key was pressed KeyValue – the ASCII value of the pressed key KeyCode – the code of the pressed key, usually used for special keys detection

Handle Multiple Events Sometimes, it is convenient to handle multiple events by 1 event handler only For this case, programmers can set different value of Tag of each control Instead of create new event handler, append the event to the same event handler Check the Tag of the control in event handler to identify the source of event

Handle Multiple Event Example Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click, Button2.Click Dim b As Button = sender If b.Tag = 1 Then MsgBox(“Button 1 was pressed”) Else MsgBox(“Button 2 was pressed”) End If End Sub