LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I open Windows Media Player 11 in a new window via labview 8.5 using ActiveX

Hello,
 
Although familiar with Labview, I am new to the ActiveX Controls. I have managed to open and play movie files in Labview with ActiveX controls but the player is embedded in Labview's front panel. How can I control what file is played and when it starts in Labview but have Windows media player 11 open in a separate window.
Additionally, where can I find a description of the ActiveX properties.
 
Thank you
0 Kudos
Message 1 of 5
(6,408 Views)

"oco" <x@no.email> wrote in message
news:1206387606453-676750@exchange.ni.com...
> Although&nbsp;familiar with&nbsp;Labview, I am new to the ActiveX
Controls.&nbsp;I have managed to open and play movie files in Labview with
ActiveX controls but the player is embedded in Labview's front panel. How
can I control&nbsp;what file is played and when it starts in Labview but
have Windows media player 11 open in a separate window.

ActiveX wasn't ment to be used that way, and I don't think you can use it
like that. Perhaps if you open an automation reference (instead of an
ActiveX control) you have an option to open a windows, but I don't think
so...

> Additionally,&nbsp;where can I find a&nbsp;description of the ActiveX
properties.

There is not one place to find ActiveX descriptions, since they depend on
the maker of the component. For Windows Media Player, I'd try the MSDN, but
usually the examples are in C/C++/C# or VB. Never in LabVIEW... The hardest
part is converting the sample code to LabVIEW.

Regards,

Wiebe.


0 Kudos
Message 2 of 5
(6,381 Views)
You can try using the Open URL in Default Browser VI and pass in the path to the music file as a URL. Assuming your file associations and your browser is set up to launch Windows Media Player it may automatically launch it and play the sound.
0 Kudos
Message 3 of 5
(6,373 Views)
He has movie files, not music files. But same applies.

I had some great experiences with mplayer. I had the mplayer running movies
in a VI's front panel without any problem. Just something you (oco) might
look into.

Regards,

Wiebe.


0 Kudos
Message 4 of 5
(6,349 Views)

I'm trying to accomplish this same thing and am having a hell of a time finding the right Class, right Methods, and/or right Properties for a solution.  Some classes seem to return obscure errors when I try to create them use the invoke node "launchURL" (the WMPLib.ICore for example).  If I use the Player base class (which MSDS says is the root class and the class that is used when you create an embedded player) I don't get anything.

 

What I would like is to progmatically launch Windows Media Player to play a particular video clip in full screen on the secondary monitor.  It seems like this should work:

 

Open Media Player.png

 

But doesn't... any ideas for this?  The C# examples are difficult to understand for me.  Also, the WMP class library is a MESS! (IMHO).  Thanks for your input.

0 Kudos
Message 5 of 5
(5,020 Views)