Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

msdxm.ocx - Windows Media Player Help...

Posted on 2002-03-26
4
Medium Priority
?
977 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
[X]
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
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 200 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…
Suggested Courses

721 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