Graphics and Multimedia. Outline Introduction to Multimedia Loading, Displaying and Scaling Images Windows Media Player Adding a Flash Movie Microsoft.

Slides:



Advertisements
Similar presentations
Support.ebsco.com EBSCOadmin Branding Tutorial. Welcome to the EBSCOadmin Skinning and Branding tutorial, where you will learn how to customize EBSCOhost.
Advertisements

Chapter 11 Media and Interactivity Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Using Multimedia on the Web Enhancing a Web Site with Sound, Video, and Applets.
CNIT 132 – Week 9 Multimedia. Working with Multimedia Bandwidth is a measure of the amount of data that can be sent through a communication pipeline each.
Chapter 11 Media and Interactivity Basics Key Concepts
HTML Structure & Web Design Basics
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.
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,
Computers Going Online Internet Browsers Browsers retrieve and view Internet-based information interact with servers download and upload information ©
 Pearson Education, Inc. All rights reserved Multimedia: Applets and Applications.
Graphics and Multimedia. Outline Introduction Graphics Contexts and Graphics Objects Color Control.
Microsoft Office Illustrated Inserting Illustrations, Objects, and Media Clips.
Tutorial 7 Working with Multimedia. XP Objectives Explore various multimedia applications on the Web Learn about sound file formats and properties Embed.
Graphics and Multimedia. Introduction The language contains many sophisticated drawing capabilities as part of namespace System.Drawing and the other.
HYPERTEXT MARKUP LANGUAGE (HTML)
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® Small Basic The Controls Object Estimated time to complete this lesson: 1 hour.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Microsoft Visual Basic 2005 CHAPTER 12 Cell Phone Applications and Web Services.
© 2011 Delmar, Cengage Learning Chapter 11 Adding Media and Interactivity with Flash and Spry.
Computer Science [3] Java Programming II - Laboratory Course Lab 7: Multimedia: Applets and Applications Faculty of Engineering & IT Software Engineering.
Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project.
Lab 8 – C# Programming Adding two numbers CSCI 6303 – Principles of I.T. Dr. Abraham Fall 2012.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
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.
 2005 Pearson Education, Inc. All rights reserved Multimedia: Applets and Applications.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
Tutorial 7 Working with Multimedia. XP Objectives Explore various multimedia applications on the Web Learn about sound file formats and properties Embed.
HTML, Third Edition--Illustrated Brief 1 HTML, Third Edition Illustrated Brief Unit D Adding Graphics and Multimedia.
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.
Tutorial 8 Programming with ActionScript 3.0. XP Objectives Review the basics of ActionScript programming Compare ActionScript 2.0 and ActionScript 3.0.
Tutorial 7 Working with Multimedia. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Explore various multimedia applications.
Tutorial 7 Working with Multimedia. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Explore various multimedia applications.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved CheckWriter Application Introducing Graphics and Printing.
Tutorial 7 Planning and Creating a Flash Web Site.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 3 Welcome Application Introduction to Visual Programming.
Microsoft Visual Basic 2008 CHAPTER TWELVE Cell Phone Applications and Web Services.
Multimedia Web Pages. Multimedia displays Browser can load web pages that contains multimedia elements 1. Helper applications: stand-alone programs that.
line.net/ okpop.com/bar elythereflashin dex.html.
16.9 Introduction to Multimedia Visual Basic offers many convenient ways to include images and animations in programs Computing field decades ago mainly.
Microsoft Visual Basic 2008: Reloaded Third Edition Chapter One An Introduction to Visual Basic 2008.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 6 1 Microsoft Office Access 2003 Tutorial 6 – Creating Custom Forms.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Integrating Components and Dynamic Text Boxes with the Animated Map– Lesson 101 Integrating Components and Dynamic Text Boxes with the Animated Map Lesson.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Introducing Scratch Learning resources for the implementation of the scenario
Adobe Flash Professional CS5 – Illustrated Unit A: Getting Started with Adobe Flash Professional.
Chapter 1: An Introduction to Visual Basic 2015
3.01 Apply Controls Associated With Visual Studio Form
3.01 Apply Controls Associated With Visual Studio Form
Using Procedures and Exception Handling
Microsoft Office Access 2003
Microsoft Office Access 2003
Working with Multimedia
About Multimedia Files
Web Programming– UFCFB Lecture 8
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:

Graphics and Multimedia

Outline Introduction to Multimedia Loading, Displaying and Scaling Images Windows Media Player Adding a Flash Movie Microsoft Agent

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

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

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

Adding Flash Movie In order to play the Flash movie in your VB.NET application, you should add Shockwave Flash component as COM reference in your project and use Shockwave control added in the Toolbox. The following steps shows you the way: 1. In Solution Explore, right click References and choose Add Reference. In COM tab, add Shockwave Flash. 2. Right click Toolbox -> Click "Choose Items", in COM Components tab, choose Shockwave Flash Object, then you can see the control in the Toolbox. 3. Drag and drop the Shockwave control on the form, you may get "Failed to import the ActiveX control. Please ensure it is properly registered." error message. Click OK. 4. Right click the project name in Solution Explorer, choose "Rebuild". When the project rebuild successfully, you are able to add the Shockwave control on the form this time.

Example Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles MyBase.Load AxShockwaveFlash1.Movie = "D:\nabd.swf" AxShockwaveFlash1.Play() End Sub End Class

Make sure that you have the latest version of Shockwave and Flash Player. oad/download.cgi (Shockwave) d/do...=ShockwaveFlash (Flash Player) oad/download.cgi d/do...=ShockwaveFlash

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,