Detecting whether WMP is playing
Hi,
I am writing an app to turn my PC off after a determined time has passed.
Part of the functionality I also want to include is to automatically shut down once Windows Media Player has finished playing a file.
For this, I need to be able to detect when a file has finished playing, or the length of the file currently being played.
I have looked at windows messaging with pInvoke, but cannot find a suitable message to get the correct parameters (using spy++).
I have also looked at detecting fullscreen mode, before I realised WMP now stays fullscreen even when the file has finished.
Could anyone offer any suggestions on how this could be done?
Thanks in advance,
Joe