?
Solved

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

Posted on 2004-08-09
1
Medium Priority
?
731 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 1000 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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…
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…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

719 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