LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to play a music file with Windows media player included as ActiveX?

Is there an easy way to play an mp3 file with Windows Mwdia Player, that I put in the panel as an ActiveX?
0 Kudos
Message 1 of 4
(3,591 Views)
The Easy way is to call the appropriate method to play a selected file from the activeX.
See the example attached...

AlessioD
National Instruments
0 Kudos
Message 2 of 4
(3,579 Views)
National Instruments has published a media player example here.
You can just change the call to MediaPlayer_IMediaPlayer2SetFileName() to pass the path of your MP3 file.
The example was created in CVI 7.0. I loaded it into CVI 6.0 and it gave me a warning that the UIR was created in a later version, but it ran fine and played a couple of MP3's that I tried. I'm running CVI 6, Media Player 7, Windows 2000.
0 Kudos
Message 3 of 4
(3,570 Views)
Thank you AI S,
I was overlooking the main subject to this forum post. The example I attached is for LabVIEW. It works basically the same as the one you mentioned for CVI.
Regards,

AlessioD
0 Kudos
Message 4 of 4
(3,564 Views)