views:

85

answers:

2

Hi,

I want to programmtically detect the state of movie currently being played in Windows Media Player. i..e if the movie is maximized I need to find that it is maximized and put the word "MAXIMIZED" in text file, if the movie is paused I need to capture PAUSED in text file, if movie is stopped I need to capture STOPPED in text file.

The capturing needs to happen in the background i.e. totally transparent to end user as the user takes action while watching the movie on Windows Media player

I am planning to achieve this using Visual Basic 6.0

Kindly provide me inputs / pointers on how to go about this.

Thanks

A: 

I think only way how to do this, is using Windows Media Player SDK.

Windows Media Developer Center

MicTech
A: 

You have to create a Media Player plugin and access the state using the Media Player API.

Theoretically you could also do some external analysis of the Media Player, for example by enumerating its windows and handles and reading window texts, but that would be very "hacky" and most fragile.

Although creating a plugin sounds like a lot of work, it'll be the better solution in the long run.

DR