16.9 Introduction to Multimedia Visual Basic offers many convenient ways to include images and animations in programs Computing field decades ago mainly.

Slides:



Advertisements
Similar presentations
Chapter 9 Color, Sound and Graphics
Advertisements

COMPUTER PROGRAMMING I Objective 8.03 Apply Animation and Graphic Methods in a Windows Form (4%)
Chapter 11 Media and Interactivity Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Chapter 11 Media and Interactivity Basics Key Concepts
Chapter 3 Application Software p. 6.
Graphics and Multimedia Session 13 Mata kuliah: M0874 – Programming II Tahun: 2010.
Unit 6 – Multimedia Element: Animation
Mark Dixon, SoCCE SOFT 131Page 1 22 – Visual BASIC 2005.
Using Photostory. Creating a Visual Audio Story in Microsoft Photo Story 3 Before you begin, you will need to save images and sounds to file ready for.
1 L45 Multimedia: Applets and Applications. 2 OBJECTIVES  How to get and display images.  To create animations from sequences of images.  To create.
Chapter 1: An Introduction to Visual Basic.NET Programming with Microsoft Visual Basic.NET, Second Edition.
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,
 Pearson Education, Inc. All rights reserved Multimedia: Applets and Applications.
Graphics and Multimedia. Outline Introduction Graphics Contexts and Graphics Objects Color Control.
Graphics and Multimedia. Introduction The language contains many sophisticated drawing capabilities as part of namespace System.Drawing and the other.
1 Chapter 26 D&D – Graphics Outline 26.1 Introduction 26.3 Graphics Contexts and Graphics Objects 26.4 Color Control 26.5 Font Control 26.6 Drawing Lines,
1 ADVANCED MICROSOFT POWERPOINT Lesson 7 – Working with Visual and Sound Objects Microsoft Office 2003: Advanced.
Graphics and Multimedia In visual Studio. Net (C#)
Microsoft Office 2007: Introductory 1 Word Lesson 6 Working with Graphics Computer Applications 1.
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter One An Introduction to Visual Basic 2010.
Microsoft® Small Basic The Controls Object Estimated time to complete this lesson: 1 hour.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. M I C R O S O F T ® Animating and Using Multimedia Effects Lesson 10.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Microsoft Visual Basic 2005 CHAPTER 12 Cell Phone Applications and Web Services.
Graphics and Multimedia. Outline Introduction to Multimedia Loading, Displaying and Scaling Images Windows Media Player Adding a Flash Movie Microsoft.
Computer Science [3] Java Programming II - Laboratory Course Lab 7: Multimedia: Applets and Applications Faculty of Engineering & IT Software Engineering.
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.
Computer Programming and Basic Software Engineering 9 Building Graphical User Interface A Brief Introduction to GDI+ S.R.G. Fraser, Pro Visual C++/CLI.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
XP New Perspectives on Microsoft Access 2002 Tutorial 51 Microsoft Access 2002 Tutorial 5 – Enhancing a Table’s Design, and Creating Advanced Queries and.
CIS 338: Creating ActiveX Controls Dr. Ralph D. Westfall March, 2003.
Microsoft Visual Basic 2008 CHAPTER 8 Using Procedures and Exception Handling.
Java Programming, 3e Concepts and Techniques Chapter 3 Section 65 – Manipulating Data Using Methods – Java Applet.
COMPUTER PROGRAMMING I Objective 8.03 Apply Animation and Graphic Methods in a Windows Form (4%)
Tutorial 1: An Introduction to Visual Basic.NET1 Tutorial 1 An Introduction to Visual Basic.NET.
 2005 Pearson Education, Inc. All rights reserved Multimedia: Applets and Applications.
HTML, Third Edition--Illustrated Brief 1 HTML, Third Edition Illustrated Brief Unit D Adding Graphics and Multimedia.
Microsoft Word 2000 Presentation 5. Major Word Topics Columns Tables Lists.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 4 I Need a Tour Guide.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 27 - Phone Book Application Introducing Multimedia.
Microsoft Visual Basic 2005 CHAPTER 7 Creating Web Applications.
Microsoft Visual Basic 2012 CHAPTER THREE Program Design and Coding.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved CheckWriter Application Introducing Graphics and Printing.
Microsoft Visual Basic 2008 CHAPTER TWELVE Cell Phone Applications and Web Services.
Some graphics. Projects included A slideshow a dark moon moving phases of the moon billiards Your own icons and bitmaps Pie chart.
Microsoft Access 2010 Chapter 8 Advanced Form Techniques.
1. Chapter 15 Creating Charts 3 Charting Data in Word A chart or graph presents data visually. A chart depicts numeric data in a graphical format. If.
Chapter 2 – Introduction to the Visual Studio .NET IDE
line.net/ okpop.com/bar elythereflashin dex.html.
Microsoft Visual Basic 2008: Reloaded Third Edition Chapter One An Introduction to Visual Basic 2008.
Microsoft Visual Basic 2012 CHAPTER FOUR Variables and Arithmetic Operations.
1 Windows Forms II Chapter RadioButton / GroupBox Controls Used to solicit a multiple choice input. Radio buttons work as a group. Selecting one.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 6 1 Microsoft Office Access 2003 Tutorial 6 – Creating Custom Forms.
COM148X1 Interactive Programming Lecture 8. Topics Today Review.
COM 205 Multimedia Applications St. Joseph’s College Fall 2004.
COMPREHENSIVE PowerPoint Tutorial 5 Applying Advanced Special Effects in Presentations.
Introducing Scratch Learning resources for the implementation of the scenario
Chapter 1: An Introduction to Visual Basic .NET
Chapter 1: An Introduction to Visual Basic 2015
Computer Programming I
Graphics and Multimedia
Using Procedures and Exception Handling
Chapter 7 Advanced Form Techniques
Variables and Arithmetic Operations
Microsoft Office Access 2003
Microsoft Office Access 2003
CIS 338: Images on Forms Dr. Ralph D. Westfall May, 2009.
Overview of the IDE Visual Studio .NET is Microsoft’s Integrated Development Environment (IDE) for creating, running and debugging programs (also.
Presentation transcript:

16.9 Introduction to Multimedia Visual Basic offers many convenient ways to include images and animations in programs Computing field decades ago mainly used computers to perform arithmetic calculations – We are beginning to realize the importance of computer’s data-manipulation capabilities Multimedia programming presents many challenges Multimedia applications demand extraordinary computing power

16.10 Loading, Displaying and Scrolling Images Visual Basic’s multimedia capabilities – Graphics – Images – Animations – Video Image manipulation

1 ' Fig : DisplayLogo.vb 2 ' Displaying and resizing an image. 3 4 Public Class FrmDisplayLogo 5 Inherits System.Windows.Forms.Form 6 15 Private mGraphicsObject As Graphics 16 Private mImage As Image ' sets member variables on form load 19 Private Sub FrmDisplayLogo_Load(ByVal sender As _ 20 System.Object, ByVal e As System.EventArgs) _ 21 Handles MyBase.Load ' get Form's graphics object 24 mGraphicsObject = Me.CreateGraphics ' load image 27 mImage = Image.FromFile("images/Logo.gif") End Sub ' FrmDisplayLogo_Load 30 Uses Form method CreateGraphics to create a Graphics object associated with the Form The Image method FromFile retrieves an image stored on disk and assigns it to mImage

33 Private Sub cmdSetButton_Click (ByVal sender As System.Object, _ 34 ByVal e As System.EventArgs) Handles cmdSetButton.Click ' get user input 37 Dim width As Integer = Convert.ToInt32(txtWidth.Text) 38 Dim height As Integer = Convert.ToInt32(txtHeight.Text) ' if specified dimensions are too large display problem 41 If (width > 375 OrElse height > 225) Then 42 MessageBox.Show("Height or Width too large") Return 45 End If 46 mGraphicsObject.Clear(Me.BackColor) ' clear Windows Form ' draw image 49 mGraphicsObject.DrawImage(mImage, 5, 5, width, height) 50 End Sub ' cmdSetButton_Click End Class ' FrmDisplayLogo If the parameters are valid, Graphics method Clear is called to paint the entire Form in the current background color Graphics method DrawImage is called with the following parameters: the image to draw, the x-coordinate of the upper-left corner, y-coordinate of the upper- left corner, width of the image, and height of the image

16.11 Animating a Series of Images Two-dimensional collision detection – Two-dimensional collision detection is the detection of an overlap between two shapes Chess Board – Defined by alternating light and dark tiles across a row in the pattern where the color that starts each row is equal to the color of last tile of previous row Artifacts – An artifact is any unintended visual abnormality in a graphical program

Places the first image in the PictureBox Modifies the size of the PictureBox so that it is equal to the size of the Image it is displaying Load each of 30 images and place then in an ArrayList The event handler for timer’s Tick event displays the next mage from the ArrayList. Timer interval = 50 ms

16.12 Windows Media Player Windows Media player – Enables an application to play video and sound in many multimedia formats Motion Pictures Experts Group (MPEG) Audio-Video Interleave (AVI) Windows wave-file format (WAV) Musical Instrument Digital Interface (MIDI) – To use the Windows Media Player control, programmers must add the control to the Toolbox. This is accomplished as following:

1. Go to ToolBox  Choose Items Click on the COM Components tab and scroll down near the bottom of the List. Look for Windows Media Player. 3. When you have found Windows Media Player, check the box beside it and click on Ok Windows Media Player

4. The windows media player control should now be in your Toolbox 5. Drag the control over a form and size it as needed Windows Media Player

16.13 Microsoft Agent Microsoft Agent – Microsoft Agent is a technology used to add interactive animated characters to Windows applications or Web pages Microsoft Agent control provides programmers with access to four predefined characters: Genie (a genie), Merlin (a wizard), Peedy (a parrot), and Robby (a robot).

Microsoft provides basic information on Agent technology at its Web site: This section introduces the basic capabilities of the Microsoft Agent control. For complete details on downloading this control, visit: The following example, Peedy’s Pizza Palace, was developed by Microsoft to illustrate the capabilities of the Microsoft Agent control. You can view this example at: Microsoft Agent

Fig Peedy introducing himself when the window opens.

To use MS Agent, you have to add to your ToolBox: 1. Go to ToolBox  Choose Items Click on the COM Components tab and scroll down near the bottom of the List. Check MS Agent Control. 3. Drag it to your form Before running any code, you first must download and install the control, speech recognition engine, text to speech engine and the character definitions from the Microsoft Agent Web site listed previously Microsoft Agent

In addition to the Microsoft Agent object myAgent (of type AxAgent) that manages all the characters, we also need an object (of type IAgentCtlCharacter) to represent the current character. We create this object, named mSpkr,