Home All Groups Group Topic Archive Search About

windows media player problem

Author
24 Mar 2005 6:49 PM
Messer
hello,

i'd like my application to play video "friday.wmv" just after "monday.wmv".
i don't want to use a playlist. the wmp is deaf just after playing the first
video. what am i doing wrong?
windows xp, wmp 9

the code:

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles MyBase.Load

player.URL = "c:\temp\monday.wmv"

player.Ctlcontrols.play()

End Sub

Private Sub player_PlayStateChange(ByVal sender As Object, ByVal e As
AxWMPLib._WMPOCXEvents_PlayStateChangeEvent) Handles player.PlayStateChange

If e.newState = 1 Then

player.URL = "c:\temp\friday.wmv"

player.Ctlcontrols.play()

End If

End Sub

Author
7 Apr 2005 7:26 PM
Dr Lomax
In the PlayStateChange function, we probably need to check the state
where playstate = mediaended or stopped and then execute your code in
there. I think that should work.

*** Sent via Developersdex http://www.developersdex.com ***