Solved

How to intercept OnClick event of Paus/Play and stop buttons on Windows Media Player ActiveX control

Posted on 2004-08-09
1
722 Views
Last Modified: 2008-01-09
This is a follow up question on "How to use keystrok to Play/Pause video running... at: http://experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_21084010.html"

Key strokes P (for play/pause) and S (for stop) are working fine now.  Upon P or S key strokes, some lables on a VB form are updated as well.  I need to intercept OnClick events when a user wants to use pause/play or stop button present on Windows Media Player ActiveX itself (I want to intercept them to update some lables on the VB form).

Any idea how to do this?

Thank you

0
Comment
Question by:Mike Eghtebas
[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
1 Comment
 
LVL 19

Accepted Solution

by:
Shauli earned 250 total points
ID: 11757774
Private Sub WindowsMediaPlayer1_PlayStateChange(ByVal NewState As Long)
Select Case NewState
    Case 1 'stopped
        'do your stuff
    Case 2 'paused
        'do your other stuff
    Case 3 'play
        'do your totally defferent stuff
End Select
End Sub

S
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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.
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…
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
Course of the Month11 days, 4 hours left to enroll

628 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