1 Aug 2009

Loop in Windows Media Player control

Question:Hello

I am using a Windows Media Player control in my software, and I need to know if it is possible to set a file to loop.

From the Reference section online, it looks like the AutoRewind property is what I need to set, but I am unable to find it.

Does anyone have any ideas?

Thanks


Guy Joseph - Intel Quad Q9450, 4Gb Ram, 1Tb Hard Drive, NVidia 8800GT, Marian Marc 8, VB Express 2008


Answer 1:

Hello Guyjos,

.

 

The loop feature is not one that is included in Windows Media Player 11. This feature is available through third party programs which can be found for free using your search engine and doing a keyword search.

 

Using Third Party Software, including hardware drivers can cause serious problems that may prevent your computer from booting properly. Microsoft cannot guarantee that any problems resulting from the use of Third Party Software can be solved. Using Third Party Software is at your own risk.


Judd


Answer 2:Hi

Thanks for that.  It's pretty rubbish that it's not included!

Would it be possible to handle some of the events of the media player control to "enable" it, by resetting the position to the end?

Thanks
Guy Joseph - Intel Quad Q9450, 4Gb Ram, 1Tb Hard Drive, NVidia 8800GT, Marian Marc 8, VB Express 2008

Answer 3:There is a better way - provided by another contributor from another forum:

    Private   Sub   LoadForm(ByVal   sender As   System.Object, ByVal   e As   System.EventArgs) Handles   MyBase  .Load
AddHandler WMPPlayer1.PlayStateChange, AddressOf Player_PlayStateChange
End Sub

Private Sub Player_PlayStateChange(ByVal sender As Object , ByVal e As AxWMPLib._WMPOCXEvents_PlayStateChangeEvent) Handles WMPPlayer1.PlayStateChange
If e.newState = 1 Then
If MODGeneralRoutines.player1Loop = True Then
WMPPlayer1.Ctlcontrols.play()
End If
End If
End Sub
Sorted!

Thanks for your help though

Guy Joseph - Intel Quad Q9450, 4Gb Ram, 1Tb Hard Drive, NVidia 8800GT, Marian Marc 8, VB Express 2008

No comments:

Recent