Windows Media Player
-
Monday, April 16, 2012 1:12 AM
Trying to setup some basic functions for the windows media player in a VB form. Its telling me playstate is readonly. anyway to change this?
Private Sub AxWindowsMediaPlayer1_PlayStateChange(ByVal sender As Object, ByVal e As AxWMPLib._WMPOCXEvents_PlayStateChangeEvent) Handles AxWindowsMediaPlayer1.PlayStateChange If Global_Variables.GameMusic = False Then AxWindowsMediaPlayer1.playState = WMPLib.WMPPlayState.wmppsStopped End If End Sub
All Replies
-
Monday, April 16, 2012 3:08 PM
I think if you want to start and stop you need to use CtlControls:
MediaPlayer.Ctlcontrols.stop()
The playState property is read-only.
Paul ~~~~ Microsoft MVP (Visual Basic)
- Edited by Paul P Clement IVMVP Monday, April 16, 2012 3:08 PM
- Proposed As Answer by Mark Liu-lxfModerator Tuesday, April 17, 2012 2:44 AM
-
Monday, April 16, 2012 4:04 PM
Holmes,
Be aware that there is a Microsoft product Windows Media Player and a .Net class Windows MediaPlayer.
It is a very nice one to use instead of the AXMediaplayer
http://msdn.microsoft.com/en-us/library/system.windows.media.mediaplayer.aspx
Success
Cor- Marked As Answer by mholmes_3038 Tuesday, April 17, 2012 2:51 AM

