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.

Slides:



Advertisements
Similar presentations
Microsoft ® Office Word 2007 Training Header and footer basics Sweetwater ISD presents:
Advertisements

Microsoft® Small Basic
IS660Z Programming Games Using Visual Basic Overview of Cannonball.
Visual Basic: ballistics
Chapter 9 Color, Sound and Graphics
COMPUTER PROGRAMMING I Objective 8.03 Apply Animation and Graphic Methods in a Windows Form (4%)
Programming with Microsoft Visual Basic th Edition
How to get started with Excel VBA. We need to enable programming in Excel  the “Developer menu”
Mark Dixon, SoCCE SOFT 136Page 1 05 – Conditional Execution.
IS 1181 IS 118 Introduction to Development Tools VB Chapter 03.
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.
CVEV 118/698 Visual Basic Lecture 3 Prof. Mounir Mabsout Elsa Sulukdjian Walid El Asmar.
Introduction to computers & Visual Basic School of Business Eastern Illinois University © Abdou Illia, Spring 2003 (Week 3, Monday 1/27/2003)
VB Controls and Events Week 7: Picture Box, Image Box, Option, Check box, Mouse over, Frames, Shapes.
Mark Dixon, SoCCE SOFT 131Page 1 03 – Debugging, Sound, and Graphics.
Controls General Discussion. VB Controls Visual Basic Controls A control is the generic name for any object placed on a form Controls may be images,
Visual Basic Examples.
© 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.
Chapter 8: String Manipulation
Visual Basic Chapter 1 Mr. Wangler.
MrsBillinghurst. net A2 Computing A2 Computing Projects Game Animation in Pascal.
COMPUTER PROGRAMMING I Objective 8.03 Apply Animation and Graphic Methods in a Windows Form (4%)
Visual Basic Games: Prepare for Hangman
Visual Basic Games: Week 3 Global variables, parameters, Select, KeyDown Enable, Visible, Focus State of Game Read chapter 3.
How to create a Splash Screen in MS Access Carlos Coronel.
Visual Basic .NET BASICS
1 Loops and Branches Ch 21 and Ch18 And how you can use them to draw cool pictures!
2. Recording a Macro. Macro Recording Select Record Macro from the Macro file menu and the dialog box opposite will appear Your macro will require a name.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.
Chapter 9 - VB.Net by Schneider1 Chapter 9 – Additional Controls and Objects 9.1 List Boxes, Combo Boxes, and the File-Opening Control The List Box Control.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 7 The Game Loop and Animation Starting Out with Games & Graphics.
Microsoft Visual Basic 2012 CHAPTER THREE Program Design and Coding.
VB Games: Preparing for Memory Brainstorm controls & events Parallel structures (again), Visibility, LoadPicture, User-defined procedures, Do While/Loop,busy.
Arrays Code: Arrays Controls: Control Arrays, PictureBox, Timer.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Some graphics. Projects included A slideshow a dark moon moving phases of the moon billiards Your own icons and bitmaps Pie chart.
How to use the timing feature Click to choose a shape, then click on the screen and drag it to place in on the slide.
The PictureBox Control Prefix Prefix – pic Image Property PictureBox Image Property – Changes the image or file that appears inside of the PictureBox SizeMode.
Tutorial 51 Programming Structures Sequence - program instructions are processed, one after another, in the order in which they appear in the program Selection.
Chapter 5: More on the Selection Structure Programming with Microsoft Visual Basic 2005, Third Edition.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
Programming with Microsoft Visual Basic th Edition
Multimedia MCI Control. MCI control enables a program to interact with any multimedia device connected to the computer that supports Media Control Interface.
1 Getting Started Exercise Part 1. 2 Profiles related to the exercise When starting use archive profile: GettingStarted_Start.zip The fully completed.
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.
Creating Web Documents catch-up JavaScript slide show tools redirection.
Mark Dixon, SoCCE SOFT 131Page 1 16 – Visual BASIC 6.0.
More Form Tools Combo Box (displays a list) Check Box (yes/no) Frame (groups option buttons) Option Button (exclusive choice) Ref Edit (user selects cells)
Slide 1 Using Menu Bar & Common Dialog Boxes. Slide 2 Setting Up the Main Items v First open the form on which you want the menu located v Then start.
Slide 1 VB Graphics Controls & Timer Control. Slide 2 Default Controls.
Controls. Common properties Height – Height of the control Left – Left of the control Width – width of a control Top - From the screen top Font – Foreground.
Video in Macromedia Flash (Optional) – Lesson 121 Video in Macromedia Flash (Optional) Lesson 12.
VB 4 Controls Scrollbar Radio button check box listboxes timers control arrays.
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
Chapter Five More on the Selection Structure Programming with Microsoft Visual Basic th Edition.
COM148X1 Interactive Programming Lecture 8. Topics Today Review.
Visual Basic.NET BASICS Lesson 9 Nested If Statements and Radio Buttons.
COMPUTER PROGRAMMING I Apply Procedures to Develop List Box and Combo Box Objects.
Chapter 1: An Introduction to Visual Basic .NET
Apply Procedures to Develop Menus, List Box and Combo Box Objects
A Tutorial on How to Turn PowerPoint Presentations into Slideshows
Computer Programming I
Chapter 1: An Introduction to Visual Basic 2015
Apply Procedures to Develop Menus, List Box and Combo Box Objects
JavaScript Selection Statement Creating Array
Visual Basic: Week 5 Review User defined functions
Additional Topics in VB.NET
Chapter 12 Graphics in Windows and the Web
Presentation transcript:

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 object must be set to True. (Recall Test#3 - Student mark graph)

Circle Method (Revisited) > Me.Circle (x,y), radius

Circle Method (Arc) > Me.Circle (x,y), radius,, Start, End angle > Angle measure are in radians

Circle Method (Pie Slice) > Me.Circle (x,y), radius,, -Start, -End angle > Start and End angles must be negative

PaintPicture Method > The PaintPicture method is used to place an image in a certain location within a container > The syntax is as follows: >object.PaintPicture object2.Picture, x, y

Cls Method > The Cls method is used to clear a container of all graphics drawn on it using the graphic methods. > The syntax is as follows: >object.Cls

Using a Timer Object > The Timer method is used to execute code at specific time intervals. > A timer object ( ) can be used to simulate animation. > Properties: >Name >Interval >Enabled

Timer Object Properties > Properties: >Name >Interval - is the amount of time (milliseconds) before the Timer event is executed. It can be changed at runtime. >Enabled - can be set to either True or False. When enabled is True, the Timer event will be called. When Enabled is False, The Timer event will not be called.

Timer Event > The timer event occurs automatically after the amount of time specified in the Interval property. > After the code in the timer event procedure has been executed the timer object start counting down again.

Example of Timer Private Sub Timer1_Timer() If Me.BackColor = vbBlue Then Me.BackColor = vbRed Else Me.BackColor = vbBlue End If End Sub

Moving Line Program > This program uses the timer event to change the endpoint coordinates of the line randomly after the amount of time specified in the Interval property. > Moving Line Example Moving Line Example

Animation > Animation can be simulated by having several images on a form and then activating one image at a time. > For example, to animate a dolphin jumping, 3 pictures have been created at different points during the jump. > A timer object is used to control the speed of the animation.

Animation - Dolphin Jump > The 3 pictures can be placed in a control array (Click to see)(Click to see)

Animation - Control Array > A control array can be created by setting the Name property to the same value > For example: All 3 dolphin picture objects were named picDolphin and they were given index values 0, 1, 2 >picDolphin(0) >picDolphin(1) >picDolphin(2)

Sound - Multimedia Object > A multimedia control can be used to add sound to an application. A multimedia object is created using the MMControl ( ) > To add the Multimedia component if it does not appear in your tool box, follow these steps:

Sound - Multimedia Object > Step 1: Choose the Component from the Project menu.

Sound - Multimedia Object > Step 2: Click here

Sound - Multimedia Object > Properties: >Name >DeviceType - changes the type of device that is playing the sound. We will use.wav files, so the DeviceType is WaveAudio >Enabled - can be set to either True or False. True indicates the object can play sound. >FileName - used to select the file to be played >Visible - establishes whether you can see the object at runtime.

Sound - Multimedia Commands > Commands: >Open - opens the mmcObject ready for playing >Close - closes mmcObject. A multimedia object should be closed before ending the application and must be closed before changing the FileName property. >Play - plays the sound track that was opened. >Stop - used to stop the file to being played >Prev - sets the sound track to its beginning.

Sound - Multimedia Object > Syntax:mmcObject.Command = Command > Example of opening a multimedia object Private Sub Form_Load() mmcSound.DeviceType = "WaveAudio" mmcSound.FileName = "Laser.wav" mmcSound.Command = "Open" End Sub

Sound - Multimedia Object > Syntax:mmcObject.Command = Command > Example of opening a multimedia object Private Sub Form_Unload(Cancel as Integer) mmcSound.Command = "Close" End Sub

Disco Dancer 2000 > Check it out! Check it out!

Summary > The following concepts were covered today: >Shape >Circles, Arcs and Pie Slices >Picture Box vs. Image Box >PaintPicture >Move Method >Animation >Sound