Solved

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

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now