Solved

msdxm.ocx - Windows Media Player Help...

Posted on 2002-03-26
4
925 Views
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.
0
Comment
Question by:Linky
  • 2
4 Comments
 
LVL 3

Expert Comment

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

nzjonboy
0
 
LVL 2

Author Comment

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

Accepted Solution

by:
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)


BA
0
 
LVL 2

Author Comment

by:Linky
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.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now