Solved

Playing AVI files using Animation control using vb6

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

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…
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

762 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