02-22-2012 09:54 AM
I am creating a program to for Windows Media Player. This program will use external buttons connected to a PCI card to read when a user presses a particular button. I need the program to wait until the video is complete before doing anything else. Is there any way to read this information with a property node?
Help will be much appreciated.
Solved! Go to Solution.
02-23-2012 08:11 AM
You could register for the player's PlayStateChange event, using a callback VI. There are shipping examples on using ActiveX callbacks. Open the Example Finder and search for "ActiveX". There is one example for Excel and one example for Internet Explorer. Windows Media Player would work the same way.
02-23-2012 02:21 PM
I already have an ActiveX automation in my program that opens the player file and maximizes it while it is playing. It's based on the "IWMPPLAYER4" method or property. I can insert a callback VI into the program, but if I use this automation, it greys out and returns an error message. The "PlayStateChange" is under a completely different category. I'm missing something here and I'm sure it's a minor detail. Is there a tutorial on this subject somewhere? I can't find anything more than generic information about property nodes.
Thanks for your help earlier.
02-23-2012 02:51 PM - edited 02-23-2012 02:51 PM
Attached is a very simply example (LV 8.2) of using that event.
You need to head over to Microsoft to get the details on the Windows Media Player properties and methods: http://msdn.microsoft.com/en-us/library/windows/desktop/dd564680%28v=vs.85%29.aspx
02-23-2012 03:07 PM
This was just the sort of information I needed.
Thanks for your help.