Similar documents
Visual Basic

Visual Basic Visual Basic

Chapter 1. Block Diagram. Text .. 1

HELP - VB TIPS. ANIMATE AN IMAGE BOX Insert a module. In this module, create a global variable: Global x

Visual Basic 6 Lecture 7. The List Box:

Start Visual Basic. Session 1. The User Interface Form (I/II) The Visual Basic Programming Environment. The Tool Box (I/II)

Learn Visual Basic 6.0

(0,0) (600, 400) CS109. PictureBox and Timer Controls

LAMPIRAN FORM 1 Universitas Sumatera Universitas Utara

( ) 1.,, Visual Basic,

Programming with visual Basic:

Customizable Progress Bar for VB6 Based on graphics in picture boxes dec 23, 2017 by Gerard Hageman

PROGRAM 1: SIMPLE CALCULATOR

NATIONAL DIPLOMA IN COMPUTER TECHNOLOGY

Before Operation. Basic Operation. Operating Instructions

Movie Maker How-To s

Angel International School - Manipay 1 st Term Examination November, 2015

2-26 Learn Visual Basic 6.0

5.) In which direction will the statement picplayer.left -= 5 animate picplayer? A. to the right B. to the left C. up the screen D.

Inserting multimedia objects in Dreamweaver

3.01C Multimedia Elements and Guidelines Explore multimedia systems, elements and presentations.

Angel International School - Manipay 1 st Term Examination November, 2015

1. Summarize. This tool is used for transforming media files into the AMV/AVI format which can be played on the Media Player.

2Practicals Visual Basic 6.0

The Control Properties

Contents Introduction Getting Started Visual Basic Form Configuration Entering the VB Code

Function: function procedures and sub procedures share the same characteristics, with

Get QuickTime Pro. QuickTime 3 Pro: MoviePlayer for Mac OS. Overview. Find Out More

User s Manual USB 2.0 TV-BOX

Overview 1. Foreword 2. Warnings

WebCam-Control-Center

Propose a mathematical formula to verify the authenticity of any product of the integers using a scale (9) and verified using computer

IS 320 Spring 96 Page 1 Exam 1. Please use your own paper to answer the following questions. Point values are shown in parentheses.

Standard File Formats

Microsoft Office 2007

HTML5: MULTIMEDIA. Multimedia. Multimedia Formats. Common Video Formats

Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init

UNIT 1 INTRODUCTION TO VISUAL BASICS 6.0

M4.2-R4: INTRODUCTION TO MULTIMEDIA

Universitas Sumatera Utara

LED STUDIO USER MANUAL

QuickTime 3 Pro: MoviePlayer for Windows 95/NT 4

Easy School Net Evolution Specifications

GPDR 1 PERSONAL ENTERTAINMENT SYSTEM USER GUIDE GOODMANS HELPLINE PHONE NUMBER

Visual Basic , ,. Caption Hello, On Off. * + +, -. 1-Arrow, , 2- Cross. - project1.vbp, 4-form1.frm.

Visual Basic ,

Multimedia. File formats. Image file formats. CSE 190 M (Web Programming) Spring 2008 University of Washington

Creating a Basic A/V presentation

LAMPIRAN. Universitas Sumatera Utara

Table of Contents. Major Functions 02. Description of Buttons/Interfaces..03. Description of Display Screen 04. Basic Operation 07

PROGRAM BASCOM AVR. ' inisialisasi '

ACD Systems at the hub of digital imaging... 1

Chapter 6 Sub Procedures

HD PLAYER SOFTWARE USER GUIDE Chapter 1- Install and Uninstall... Error! Bookmark not defined.

Upgrading Applications

GETTING STARTED WITH VBA

HyperMedia User Manual

Video to USB 2.0 Adaptor USB 201 Operation Manual

Genesis Webinar-To-Go Quick Reference Guide

Download the files from you will use these files to finish the following exercises.

LISTING PROGRAM. Form Splash

Radius= 10 cm, Color= Red, Weight= 200g, X= 3m, Y= 5m, Z= 2m. Radius= 10 cm, Color= Blue, Weight= 200g, X= 3m, Y= 5m, Z= 0m

Quick start guide to Blackboard at Keele

NIDEK AUTO REFRACTOMETER ARK-710A INTERFACE MANUAL

HP CD-Writer 9510i - Product Specificatio

University of Technology Laser & Optoelectronics Engineering Department Visual basic Lab. LostFocus Resize System event


CMPT 110 MIDTERM OCTOBER 18, 2001

Using VideoPad freeware for editing, subtitling and dubbing

Installation And User Guide DVR-EZ. 4 Channel Digital Video Recorder

Date : Jun 14, Ver. 01. InterVideo InstantON. User Manual

Visual Basic. The Integrated Development Environment. Menu Bar

We are going to use some graphics and found a nice little batman running GIF, off course you can use any image you want for the project.

BrainMaster Multimedia Player (BMrMMP) User s Manual

LED VIDEO WALL CONTROLL SYSTEM USERS MANUAL. PAW GmbH 04/2013 1

JetVote User Guide. Table of Contents

Information Hiding In Images Using Randomly Selected Points

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Label1.Text = Label1.

What s New in Studio 6?

Visual Programming 1. What is Visual Basic? 2. What are different Editions available in VB? 3. List the various features of VB

Relational Operators. > greater than < less than >= greater than or equal to <= less than or equal to <> not equal to = equal to

HDPlayer Operating Manual

DbsEditor v1.8 (Database Editor) QUICK REFERENCE

Industrial Technology

Click on the empty form and apply the following options to the properties Windows.

Operating Instructions

VSPlayer User Manual V

Multimedia Technology

Meeting Visuals UCF Toolkit User Guide

Media Formats. Sound. Image. Video. WAV (uncompressed, PCM) MIDI. BMP XML dia MPEG

VISUAL BASIC 6.0 OVERVIEW

_APP B_549_10/31/06. Appendix B. Producing for Multimedia and the Web

New Features. Importing Resources

END-TERM EXAMINATION

Irfan View keyboard shortcuts. Irfan View is one of the most popular freeware image/graphic viewers. Bellow is the full list of keyboard shortcuts :

L A M P I R A N. Universitas Sumatera Utara

Computing in the Modern World

Share Content. Share Content

Prentice Hall. Learning Microsoft PowerPoint , (Weixel et al.) Arkansas Multimedia Applications I - Curriculum Content Frameworks

Disclaimer. Need Help!?

Transcription:

11-1 11-1.1 11-1.2 11-2 11-2.1 11-2.2

108 II 11-1 Timer 11-1.1 Windows 11-1 11-1 Visual Basic Animation Animation

11 109 Animation Animation RLE AVI AVI 11-2 Visual Basic Animation / Microsoft Windows Common Controls-2 6.0 11-2 Animation 11-2 Animation AVI RLE AVI Audio Video Interleave Windows 30 30fps RLE Run Length Encoding RLE

110 II Animation 11-1 Animation 11-1 Animation Open Play AVI AVI 3 1 repeat 2 start 3 3 Stop Close AVI AVI AVI Visual Basic "\Common\Graphics\AVIs\" AVI 11-2 11-2 Visual Basic AVI filecopy.avi filedel.avi filedelr.avi filemove.avi filenuke.avi findcomp.avi findfile.avi search.avi

11 111 11-3 Animation "filecopy. avi" 11-4 11-3 Animation Private Sub Form_Load( ) filecopy.avi Animation1.Open App.Path + "\filecopy.avi" Private Sub Command1_Click( ) Animation1.Play Private Sub Command2_Click( ) Animation1.Stop App.Path Private Sub Form_Unload(Cancel As Integer) Animation1.Close 11-4 "Ch11-1a.vbp" Animation avi" "Sp11-a.frm" "Sp11-a.vbp" "filenuke.

112 II 11-1.2 Timer PaintPicture.PaintPicture Pic, X1, Y1 [, Width1 [, Height1 [, X2 [, Y2 [, Width2 [, Height2]]]]]] 1. Pic Picture Form PictureBox Image 2. X1, Y1 3. Width1, Height1 Width1 Height1 4. X2, Y2 5. Width2, Height2

11 113 11-5 11-5 Image (450, 100) (2500, 725) 1100 1800 Image1 1250 2000 "Ch11-1b.vbp" Timer PaintPicture PaintPicture Image1, 2500, 725, 2000, 1800, 450, 100, 1250, 1100 11-6 PaintPicture 11-7 11-6 PaintPicture Private Sub Timer1_Timer( ) Dim x As Integer, y As Integer, i As Integer i = Int(Rnd * 3) x = Rnd * ScaleWidth x y = Rnd * ScaleHeight y PaintPicture Image1(i), x, y

114 II 11-7 Cls "Ch11-1c.vbp" b.frm" 1 Image 3 Command PaintPicture "Sp11-b.vbp" "Sp11- (1) Image "face.gif" (2) 3 Caption eyes nose mouth (3) eyes

11 115 PaintPicture Width1 Height1 Form1 2500, 725 3000 3200 11-8 11-8 PaintPicture (2500,725) Image1 3200 PaintPicture 3000 "Ch11-1d.vbp" Private Sub Command1_Click( ) PaintPicture Image1, 2500, 725, 3000, 3200 Image Image 1. Image Stretch True 2. Image Width Height

116 II Image1 Image1 11-9 11-9 Image1 Image Image1.Height = 3200 Image1.Width = 3000 "Ch11-1e.vbp" Private Sub Command1_Click( ) Image1.Stretch = True Image1 Image1.Width = 3000 Image1 Image1.Height = 3200 Image1 PaintPicture Image Image Width Height 1. "Ex11-c.vbp" Timer PaintPicture

11 117 2. "Ex11-c.vbp" Image (1) Image Stretch Width Height (2) "Sp11-c.frm" "Sp11-c.vbp" 3. "Ex11-d.vbp" (1) 4 x y Image1 zoomx zoomy (2) PaintPicture Image1 (3) "Sp11-d.frm" "Sp11-d.vbp" 10% 10%

118 II PaintPicture 11-11 PaintPicture 11-10 Image 11-12 11-10 0.bmp 1.bmp 2.bmp 3.bmp 11-11 PaintPicture Dim i As Integer Image Dim j As Integer Private Sub Timer1_Timer( ) 200Twips PaintPicture Image1(i).Picture, j * 200, 300 i = (i + 1) Mod 4 0,1,2,3 j = j + 1 If j * 200 > ScaleWidth Then Exit Sub 11-12 "Ch11-1f.vbp"

11 119 Image Top Left 11-13 11-10 Image1 Left 11-14 11-13 Image Left Dim i As Integer Dim j As Integer Private Sub Timer1_Timer( ) 0.bmp, 1.bmp, 2.bmp, 3.bmp Image1.Picture = LoadPicture(App.Path & "\" & i & ".bmp") Image1.Left = j * 200 200Twips i = (i + 1) Mod 4 0, 1, 2, 3 j = j + 1 If j * 200 > ScaleWidth Then Exit Sub 11-14 "Ch11-1g.vbp" Image Move (x, y) Image.Move x, y 11-15 Image1 Move 11-16

120 II 11-15 Image Move Dim i As Integer Dim j As Integer Private Sub Timer1_Timer( ) 0.bmp,1.bmp,2.bmp,3.bmp Image1.Picture = LoadPicture(App.path & "\" & i & ".bmp") 200Twips Image1.Move j * 200, 300 i = (i + 1) Mod 4 0, 1, 2, 3 If j * 200 > ScaleWidth Then Exit Sub j = j + 1 11-16 Image Move "Ch11-1h.vbp" 11-3 3 11-3 Visual Basic PaintPicture Image Top Top Left Image Left Image Move Move Image vbp" 11-3 3 "Ch11-1h.

11 121 11-17 11-17 Step1 1. 11-18 11-18

122 II 2. 11-4 Form1 Caption Command1 Caption Image1 Picture 0.gif Image1 Stretch True Image2 Picture 0.gif Image2 Stretch True Label1 Caption Timer1 Interval 500 Timer1 Enabled False Step2 1. Timer1 0.5 500 Twips 2. 350 Twips 3. If-ElseIf Step3 Timer1_Timer Form_Click 10 20 30 40 Dim start As Integer start Dim win As Integer win Private Sub Command1_Click( ) Timer1.Enabled = True start = 1 start = 1

11 123 50 60 70 80 90 100 110 120 130 140 150 160 170 Private Sub Form_Click( ) Static i As Integer i If start = 1 Then i = (i + 1) Mod 3 0, 1, 2 Image2.Picture = LoadPicture(App.Path + "\ " & i & ".gif") Image2.Left = Image2.Left + 350 If win <> 1 And (Image2.Left + Image2.Width >= 6240) Then Image2.Left = 7240 - Image2.Width MsgBox " ",, " " win = 2 win 2 ElseIf win = 1 Then Exit Sub End If End If 180 190 200 210 220 230 240 250 260 270 280 290 Private Sub Timer1_Timer( ) Static j As Integer i j = (j + 1) Mod 3 0, 1, 2 Image1.Picture = LoadPicture(App.Path + "\ " & j & ".gif") Image1.Left = Image1.Left + 500 If win <> 2 And (Image1.Left + Image1.Width >= 6240) Then Image1.Left = 7240 - Image1.Width MsgBox " ",, " " Timer1.Enabled = False win = 1 win 1 ElseIf win = 2 Then Timer1.Enabled = False End If

124 II 10~20 30~40 Timer1 start 1 60~90 start 1 i Twips 350 100~130 win 1 X 6240 (1) (2) (3) win 2 140~170 win 1 190~210 0.5 j 500 Twips 220~260 win 2 X 6240 (1) (2) (3) Timer (4) win 1 270~290 win 2 Timer 5 (1) 1 Timer2 Label2 Timer2_Timer 1 i (2) If-Then 5

11 125 ( )1. Visual Basic AVI (A) Animation (B)Form (C)Image (D)PictureBox ( )2. Visual Basic (A)Cls (B)Print (C)PaintPicture (D)Point ( )3. (A)PaintPicture Image1, 200, 200 (B)PaintPicture Image1, 2500, 200 (C)PaintPicture Image1, 200, 200, 2500, 200 (D)PaintPicture Image1, 2500, 200, 200, 200 (200, 200) (2500, 200) Image1 2220 1836 ( )4. Image (D) Stretch Height Width Picture (A) (B) (C) ( )5. Image (A)Height Width (B)Picture Stretch (C)Enabled Visible (D)Left Top

126 II 1. "Ex11-e.vbp" (1) Timer1_Timer (2) Select Case (3) "Sp11-e.frm" "Sp11-e.vbp" 11-2 Visual Basic 11-2.1 Visual Basic

11 127 Animation / Microsoft Multimedia Control 6.0 11-19 11-19 11-20 9 11-5

128 II 11-20 1 2 3 4 5 6 7 8 9 11-5 1 Prev 2 Next 3 Play 4 Pause 5 Back 6 Step 7 Record 8 Stop 9 Eject Visible False RecordVisible False 11-21 11-21 RecordVisible = False CD MID WAV AVI VCD VCR MPEG

11 129 Beep Beep Beep Beep Windows 11-22 Beep 11-22 11-23( ) Beep 11-23( ) 11-23 Private Sub Command1_Click( ) Beep

130 II DeviceType DeviceType.DeviceType = " " 11-6 DeviceType 11-6 DeviceType cdaudio sequencer waveaudio avivideo videodisc vcr mpegvideo CD Mid Wav Avi VCD VCR MPEG 1 1.DeviceType = "cdaudio" CD 2 2.DeviceType = "videodisc" VCD FileName FileName.FileName = " "

11 131 1 2 1.FileName = "D:\Music\water.wav" D "Music" water.wav 2.FileName = App.Path & "\forest.avi" forest.avi Command Command.Command = " " Command Open Play Stop Close Seek 5 1.Command = "Open" 1 2.Command = "Play" hwn- Display Visual Basic 0 hwndisplay hwndisplay hwnd hwnd hwndisplay hwndisplay.hwndisplay =.hwnd

132 II 1 2 1.hWnDisplay = Picture1.hWnd Picture1 2.hWnDisplay = Form1.hWnd Form1 11-24 PictureBox AVI 11-25 11-24 AVI Private Sub Form_Activate( ) 1.DeviceType = "avivideo" AVI 1.hWndDisplay = Picture1.hWnd PictureBox flog AVI 1.FileName = App.Path + "\flog.avi" 1.Command = "open" 1 Private Sub Form_Unload(Cancel As Integer) 1.Command = "stop" 1.Command = "close" 1 11-25 AVI AVI "Ch11-2a.vbp" MPEG (1) 1 DeviceType (2) MPEG "anole.mpg"

11 133 11-2.2 Step1 TimeFormat.TimeFormat = TimeFormat 0~10 1 0 A-2 Step2 Windows Media Player 11-26 11-26

134 II 11-7 11-7 Track Tracks Position TrackPosition Length TrackLength x Step3 11-8 11-8 Int(1.TrackLength / 1000 / 60) Int(1.TrackLength / 1000) Mod 60 Int((1.Position - 1.TrackPosition)/ 1000 /60) Int((1.Position - 1.TrackPosition) / 1000) Mod 60 Int(1.Length / 1000 / 60) Int(1.Length / 1000) Mod 60 Step4 UpdateInterval StatusUpdate.UpdateInterval =

11 135 UpdateInterval 3 1 1.UpdateInterval = 1000 1 2 1.UpdateInterval = 3000 3 11-27 CD StatusUpdate 1 CD 11-28 CD 11-27 Dim min As Integer Dim sec As Integer Dim allmin As Integer Dim allsec As Integer Private Sub Form_Unload(Cancel As Integer) 1.Command = "stop" 1.Command = "close" Private Sub Form_Activate( ) 1.FileName = App.Path + "\music0.mid" 1.DeviceType = "sequencer" MID 1.Command = "open" 1 1.UpdateInterval = 1000 1

136 II Private Sub 1_StatusUpdate( ) 1.TimeFormat = 0 allmin = Int(1.TrackLength / 1000 / 60) allsec = Int((1.TrackLength) / 1000) Mod 60 min = Int((1.Position - 1.TrackPosition) _ / 1000 / 60) sec = Int((1.Position - 1.TrackPosition) _ / 1000) Mod 60 Label1.Caption = " " & allmin & " " & _ allsec & " " Label2.Caption = " " & min & " " & sec & " " CD 11-28 "Ch11-2b.vbp"

11 137 ( )1. (A)DeviceType (B)Command (C)FileName (D)Visible ( )2. (D)Visible (A)DeviceType (B)Command (C)FileName ( )3. (A)TrackLength (B)Length (C)Position (D)Command 1. AVI (1) P.135 11-27 (2) AVI "dragonfly.avi" (3) "Sp11-f.frm" "Sp11-f.vbp"

138 II ( )1. Visual Basic RLE AVI (A)Animation (B)Image (C) (D) PictureBox ( )2. Visual Basic Image Image X Y (A)Drag (B)Move (B)Top (D)Refresh ( )3. Visual Basic (A) /Project1 (B) / (C) / (D) / ( )4. Visual Basic 2 Image (A)Label (B)Timer (C) PictureBox (D)Shape ( )5. Image1 Left Top 350 200 "Image1.Move 500, 600" Image X, Y (A)500, 600 (B)850, 800 (C)350, 200 (D)250, 400 ( )6. (D)Position (A)hWndDisplay (B)hWnd (C)Track ( )7. (A)UpdateInterval (B)Filter (C)FilterIndex (D)FileName ( )8. CD (A)TrackLength (B)Length (C)Track (D)Tracks