msdxm.ocx - Windows Media Player Help...

Posted on 2002-03-26
Last Modified: 2008-01-16
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.
Question by:Linky
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Expert Comment

ID: 6897993
try creating a playlist of the movies you want to play then mediaplayer should stay in fullscreen mode


Author Comment

ID: 6898090
Well thats good, but I want the program must to do it, regardless of the person's computer.

Accepted Solution

baltman earned 50 total points
ID: 6898394
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)


Author Comment

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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question