Solved

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

Posted on 2004-08-09
1
714 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
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: 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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…

821 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