Solved

Playing AVI files using Animation control using vb6

Posted on 2007-11-25
5
2,656 Views
Last Modified: 2013-12-25
Dear Experts,
I have a bout 50 AVI movies i want to run them inside an Animation control so when the first AVI finishes the second start automatically and so on till the 50 AVI finishes.
I start developing it so i came up with the solution for how to open the AVI inside Animation control and to play it but the problem is that the AVI is keep replaying automatically and the other thing that i don't know how to let it move to the next AVI once the first one finish.
Thanks a lot

Private Sub Command1_Click()

      Animation1.Open App.pathe & "\1.avi"

      Animation1.AutoPlay = True

End Sub

Open in new window

0
Comment
Question by:loay
  • 3
5 Comments
 
LVL 31

Expert Comment

by:Frosty555
ID: 20348513
The animation control is somewhat limited in the things it can do. There are no events fired so there is no easy way of knowing whether the video has finished or not. You could potentially stop the auto-repeating by turning autoplay off, and instead calling the play() function.

Perhaps a better alternative would be to use the Windows Media Player control? You can set it to not display any user-clickable controls, as well as remote control just about anything media player is capable of doing. You could create a playlist with your AVIs and play it using the WMP control.
0
 
LVL 31

Expert Comment

by:Frosty555
ID: 20348533
The simplest way to play something in WMP control is to go

    WindowsMediaPlayer1.URL = "c:\yourpath\somefile.avi"
    WindowsMediaPlayer1.Controls.play

You could also try creating iwmpmedia objects by adding to the mediaCollection property. Use those objects to build up a new playlist (or use the currentPlaylist object), and then play that playlist.
0
 

Author Comment

by:loay
ID: 20348644
"You could also try creating iwmpmedia objects by adding to the mediaCollection property. Use those objects to build up a new playlist (or use the currentPlaylist object), and then play that playlist."

Can you give me a sample of
how to do it ?
0
 
LVL 31

Accepted Solution

by:
Frosty555 earned 50 total points
ID: 20405443
sorry about the delay, i've been pretty busy the last week.

Here is the microsoft reference and some reading for you on the Windows media player control:
http://msdn2.microsoft.com/en-us/library/bb249588.aspx
http://msdn2.microsoft.com/en-us/library/bb262381.aspx

I'll try and hammer some code together for you soon.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Looking for VB6 code to read SQL table export it to ascii 8 32
Re-position the objects 7 97
rhino JavaScript import, load 25 67
VB 6 error 5 in windows 10 but not in XP 7 44
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
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…

920 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

15 Experts available now in Live!

Get 1:1 Help Now