Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

msdxm.ocx - Windows Media Player Help...

Posted on 2002-03-26
4
Medium Priority
?
989 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 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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

824 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