Solved

resource for Animation control

Posted on 1998-12-23
3
168 Views
Last Modified: 2010-05-03
Does anyone know of a resource on the internet for AVI files compatible with the Animation control shipped in VB5?
0
Comment
Question by:bear454
3 Comments
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1452213
0
 
LVL 1

Author Comment

by:bear454
ID: 1452214
I am trying to avoid packaging another ocx in my application.  After careful consideration I have chosen the Animation control, because anyone running win32 or better will have it.
I am looking for additional AVI media, not an alternative media player.
0
 
LVL 14

Accepted Solution

by:
waty earned 100 total points
ID: 1452215
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long

Public Sub PlayAVI(sFileName As String)
   ' #VBIDEUtils#************************************************************
   ' * Programmer Name  : Waty Thierry
   ' * Web Site         : www.geocities.com/ResearchTriangle/6311/
   ' * E-Mail           : waty.thierry@usa.net
   ' * Date             : 20/11/98
   ' * Time             : 09:35
   ' * Module Name      : Multimedia_Module
   ' * Module Filename  : Multimedia.bas
   ' * Procedure Name   : PlayAVI
   ' * Parameters       :
   ' *                    sFileName As String
   ' **********************************************************************
   ' * Comments         : play an AVI video file without using the Multimedia
   ' *  (MCI) Control
   ' *
   ' **********************************************************************
   
   Dim returnstring     As String
   
   returnstring = Space(127)
   
   Call mciSendString("open " & Chr$(34) & sFileName & Chr$(34) & " type avivideo alias video", returnstring, 127, 0)
   Call mciSendString("set video time format ms", returnstring, 127, 0)
   Call mciSendString("play video from 0", returnstring, 127, 0)
   
   ' *** It is important to close the video, even if the file to play has run out.
   
End Sub

Public Sub StopAVI()
   ' #VBIDEUtils#************************************************************
   ' * Programmer Name  : Waty Thierry
   ' * Web Site         : www.geocities.com/ResearchTriangle/6311/
   ' * E-Mail           : waty.thierry@usa.net
   ' * Date             : 20/11/98
   ' * Time             : 09:36
   ' * Module Name      : Multimedia_Module
   ' * Module Filename  : Multimedia.bas
   ' * Procedure Name   : StopAVI
   ' * Parameters       :
   ' **********************************************************************
   ' * Comments         : Close a played AVI
   ' *
   ' * It is important to close the video, even if the file to play has run out.
   ' *
   ' **********************************************************************
   
   Dim returnstring     As String
   
   returnstring = Space(127)
   Call mciSendString("close video", returnstring, 127, 0)
   
End Sub


0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now