Re: Windows Media Control
I don't know the answer to your question but, at a guess, I would say that the WMP control would raise an event when the current media file finishes. If so, you should be able to handle that event and then do for the second file just what you did for the first. I'd suggest that you check out that possibility first.
Re: Windows Media Control
try this:
vb Code:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim movie1 = AxWindowsMediaPlayer1.newMedia("first_intro_movie.mpg")
Dim movie2 = AxWindowsMediaPlayer1.newMedia("second_intro_movie.mpg")
AxWindowsMediaPlayer1.currentPlaylist.appendItem(movie1)
AxWindowsMediaPlayer1.currentPlaylist.appendItem(movie2)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
AxWindowsMediaPlayer1.Ctlcontrols.play()
End Sub
End Class
Re: Windows Media Control
Nice one Paul. A playlist makes much more sense.
Re: Windows Media Control
Hey, thanks.
I'm gonna see if I can play around with it and figure it out...I'm quite new to this, so I may need some help...I forget most of what I learned last year, lol. I'm sorta like a Jack of all trades, but master of none, lol..everything from rap, to this.
http://www.myspace.com/mystikmusikentertainment
buuut anyway..
this line of code here..
Code:
AxWindowsMediaPlayer1.currentPlaylist.appendItem(movie1)
(movie1) is that replaced with the file path?
Re: Windows Media Control
Dim movie1 = AxWindowsMediaPlayer1.newMedia("filepath")
Dim movie2 = AxWindowsMediaPlayer1.newMedia("filepath")
AxWindowsMediaPlayer1.currentPlaylist.appendItem(movie1)
AxWindowsMediaPlayer1.currentPlaylist.appendItem(movie2)
Re: Windows Media Control
oh I see movie1 and movie2 are variables...I sorta overlooked the code to quickly, lol..thanks for the help man! I'll report back if I have troubles, lol.
Re: Windows Media Control
actually would you call that a variable, or something else?
Re: Windows Media Control
they are variables. they are declared inside a procedure so their scope is limited to use within that procedure. you can also use variables at class or project level if they are declared in the appropriate places.
Re: Windows Media Control
yup, I remember that. I just didn't know where they weren't declaired as integers, floats, or something to that effect what it would be classified as...lol...does it get automatically declaired as something else? lol
Re: Windows Media Control
in vb2008+ you don't need to use As clauses because of Option Infer.
if you want to declare them with As clauses, hover your mouse over the newMedia keyword to get the type