Consulting

Results 1 to 9 of 9

Thread: Windows media player in powerpoint

  1. #1
    VBAX Newbie
    Joined
    Aug 2005
    Posts
    4
    Location

    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???


  2. #2
    VBAX Master Killian's Avatar
    Joined
    Nov 2004
    Location
    London
    Posts
    1,132
    Location
    Hi Paul and welcome to VBAX

    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
    I don't know a great deal about digital media content but I'd be very interested to hear how you get on.
    K :-)

  3. #3
    VBAX Newbie
    Joined
    Aug 2005
    Posts
    4
    Location
    Cheer for your help on this & i will keep you posted on how i get on...

    Regards

    Paul

  4. #4
    Administrator
    VP-Knowledge Base
    VBAX Guru MOS MASTER's Avatar
    Joined
    Apr 2005
    Location
    Breda, The Netherlands
    Posts
    3,281
    Location
    Quote Originally Posted by Paul
    Cheer for your help on this & i will keep you posted on how i get on...

    Regards

    Paul
    Hi and Welcome to VBAX!

    I'm also curious about the outcome of this one...could you place an example presentation for us to see?

    Thanx.
    _________
    Groetjes,

    Joost Verdaasdonk
    M.O.S. Master

    Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
    (I don't answer questions asked through E-mail or PM's)

  5. #5
    VBAX Newbie
    Joined
    Aug 2005
    Posts
    4
    Location

    Question

    Hello all this is what i have come up with so far!!! (dont laugh)

    First you will need this
    http://www.microsoft.com/windows/win...n&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

  6. #6
    Administrator
    VP-Knowledge Base
    VBAX Guru MOS MASTER's Avatar
    Joined
    Apr 2005
    Location
    Breda, The Netherlands
    Posts
    3,281
    Location
    Hi Paul,

    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.
    _________
    Groetjes,

    Joost Verdaasdonk
    M.O.S. Master

    Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
    (I don't answer questions asked through E-mail or PM's)

  7. #7
    VBAX Newbie
    Joined
    Aug 2005
    Posts
    4
    Location
    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

  8. #8
    Administrator
    VP-Knowledge Base
    VBAX Guru MOS MASTER's Avatar
    Joined
    Apr 2005
    Location
    Breda, The Netherlands
    Posts
    3,281
    Location
    Hi Paul,

    Of course after I have a play with it I'll tell you if it worked.
    _________
    Groetjes,

    Joost Verdaasdonk
    M.O.S. Master

    Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
    (I don't answer questions asked through E-mail or PM's)

  9. #9
    VBAX Master Killian's Avatar
    Joined
    Nov 2004
    Location
    London
    Posts
    1,132
    Location
    cool, thnx for feedback Paul... I might have to give that a bash tomorrow
    K :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •