Solved

Playing AVI files using Animation control using vb6

Posted on 2007-11-25
5
2,640 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
The viewer will learn how to implement Singleton Design Pattern in Java.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

760 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

20 Experts available now in Live!

Get 1:1 Help Now