View Full Version : Windows media player in powerpoint
Hi there,
I am using the windows media play ocx
& want to trigger powerpoint to show a msgbox
at any time during the mpeg clip say 00:03:00
is this possible???:(
Killian
08-12-2005, 09:47 AM
Hi Paul and welcome to VBAX :hi:
I think this is do-able...
Right-click you media player object and select "View Code" - this will take you to the VBE at the object's OpenStateChange event.
In the event list (the combo box above the code window on the right) you'll see a whole load of events to add code to, such as your message box.
From what I can make out, the only way to achieve what you want is to use the MakerHit event - however, in order to use it you will have to add a marker at the required position to your media clip.
Here's where it gets a bit tricky so I'll casually leave you this MS link and leave you to it: Inserting Markers in Digital Media Content (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwmt/html/wmp7_markers.asp)
I don't know a great deal about digital media content but I'd be very interested to hear how you get on.
Cheer for your help on this & i will keep you posted on how i get on...
Regards
Paul
MOS MASTER
08-12-2005, 03:56 PM
Cheer for your help on this & i will keep you posted on how i get on...
Regards
Paul
Hi and Welcome to VBAX! :hi:
I'm also curious about the outcome of this one...could you place an example presentation for us to see?
Thanx. :whistle:
Hello all this is what i have come up with so far!!! (dont laugh)
First you will need this
http://www.microsoft.com/windows/windowsmedia/download/AllDownloads.aspx?displang=en&qstechnology=
download the encoder
once downloaded & installed open the Windows Media File Editor
This will allow you to add scripts or markers ( i have managed to use both :-))
so the choice is your....
you will need to convert your files if video to *.wmv this is done by opening the Windows Media Encoder....
If you use markers then this is what to do: Open the Media File Editor
Then open your (Im using video so *.wmv)
Click Markers then Click add
Input a name & a time say (00:00:10.0) 10 seconds then click OK,
then go to file click save & index
This is how you use markers in video....
If you need help with scripts please drop a post...
Kind regards to all that help
Paul
Manchester
England
MOS MASTER
08-16-2005, 10:00 AM
Hi Paul, :yes
Thanx...I'll try it out this weekend when I have more time.
Always love to play with controls...but they tend to absorb a lot of time...
Later. :whistle:
Once you have edited you video then using the windows media player ocx
enter this code
Private Sub WindowsMediaPlayer1_MarkerHit(ByVal MarkerNum As Long)
If WindowsMediaPlayer1.Controls.currentMarker = 1 Then
MsgBox "Your video marker has hit 10 seconds"
End If
End Sub
If you have more than one marker use (currentMarker = 2) & so-on
Have fun & let me know how you get on
Regards
Paul
MOS MASTER
08-16-2005, 10:45 AM
Hi Paul, :yes
Of course after I have a play with it I'll tell you if it worked. :whistle:
Killian
08-16-2005, 12:03 PM
cool, thnx for feedback Paul... I might have to give that a bash tomorrow
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.