Solved

Playing AVI files using Animation control using vb6

Posted on 2007-11-25
5
2,705 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
This video teaches viewers about errors in exception handling.
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 …

717 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