Solved

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

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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
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…

831 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