• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1008
  • Last Modified:

msdxm.ocx - Windows Media Player Help...

I am using Windows Media Player (msdxm.ocx) in Visual Basic. I have this:

MediaPlayer1.Open ("C:/movie1.mpeg")
MediaPlayer1.DisplaySize = mpFullScreen
MediaPlayer1.Open ("C:/movie2.mpeg")

I want VB to play the first in fullscreen and then when it is done (without going to windowed mode) play the next. How can I do this? Code would help.
0
Linky
Asked:
Linky
  • 2
1 Solution
 
nzjonboyCommented:
try creating a playlist of the movies you want to play then mediaplayer should stay in fullscreen mode

nzjonboy
0
 
LinkyAuthor Commented:
Well thats good, but I want the program must to do it, regardless of the person's computer.
0
 
baltmanCommented:
I think that MediaPlayer automatically resets to windowed mode if a stream has ended. You could use the following:


Dim CountMovies As Integer

Private Sub Form_Load()
  MediaPlayer1.Open ("C:\movie1.mpeg")
  MediaPlayer1.DisplaySize = mpFullScreen
End Sub

Private Sub MediaPlayer1_EndOfStream(ByVal Result As Long)
  CountMovies = CountMovies + 1
  Select Case CountMovies
    Case 1
      MediaPlayer1.Open ("C:\movie2.mpeg")
    Case 2
      MediaPlayer1.Open ("C:\movie3.mpeg")
    Case 3
      MediaPlayer1.Open ("C:\movie4.mpeg")
    Case 4
      ....
  End Select
End Sub


But depending on the system you are using, you might see MediaPlayer switch back to Normal Size and then automatically to Fullscreen again.

Just an idea....give it a try...:o)


BA
0
 
LinkyAuthor Commented:
Thanks a lot, it went back to window mode, but it does not matter. I just wanted code to play the next media file.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now