Solved

Playing AVI files using Animation control using vb6

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Using "ScreenUpdating" 6 63
How to update a sql 2012 database table with the time difference from 2 time frames in vb.net 2010 4 84
recursion example 16 125
Advice in Xamarin 21 78
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

776 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