LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Fixed size of Windows Media Player ?

Hi,
i added the windows media player as an activex control to one of my panels
and created the control driver (wmp.fp). The media player is connected to a
video server via url. What i'm looking for is how to set the size of the wmp
control. When i run the panel and the video server is connected the windows
media player resizes automatically. But i want to keep the control at a
fixed size. Any helpful suggestions ?
I'm also interested in getting information about the parameter settings of
the media player. Where can i find informations f.e. about the possible
settings of the uiMode and some other parameter?

Thanks for any help

Norbert Rieper
Bremerhaven, Germany


0 Kudos
Message 1 of 3
(5,766 Views)
Hi!

  Take a look at this:
  http://www.streamingmedia.com/article.asp?id=8584&page=1&c=4

   even if it fits not at 100%, you can find userful hints.....
   (mind all 4 pages!)

   If you run "genuine" software... Smiley Wink
   http://www.microsoft.com/downloads/details.aspx?FamilyID=e43cbe59-678a-458a-86a7-ff1716fad02f&displaylang=en

graziano

0 Kudos
Message 2 of 3
(5,760 Views)

Hi,

I have the same problem with the media player control. It resizes automatically as soon as media is shown. I also need to have the control at a fixed size.

The Windows Media Player SDK says (Object Model Migration Guide):

"Automatic sizing is the default behavior. To override automatic sizing, set the height and width properties in the <OBJECT> tag or in script.Automatic sizing is the default behavior. To override automatic sizing, set the height and width properties in the <OBJECT> tag or in script."

I have tried to set the height of ActiveX container by SetCtrlAttribute(panel, wmpObj,ATTR_HEIGHT, height) but it doesn't work out.  I read in a newsgroup that it works well with a popular c++ enviroment to stop the autofit function by setting the container size.

I have also tried to set the shrinkToFit property, but it doesn't work either.

This is what the WMP SDK says: 

"The shrinkToFit attribute specifies or retrieves a value indicating whether the video will shrink to the width and height defined for the Video control. ... Remarks If no width or height is specified, this attribute is ignored. "

I assume that the shrinkToFit attribute is ignored, because SetCtrlAttribute doesn't set the container size in correct way.

Moreover I have found some postings in the LV thread about this problem:

http://forums.ni.com/ni/board/message?board.id=170&message.id=154231&query.id=69396#M154231

Is this a general implementation error of CVI/LV or is it possible to fix the size of the control/container?

How can this be done?

 

 

 

 

Message Edited by MaWie on 05-22-2006 06:59 AM

0 Kudos
Message 3 of 3
(5,606 Views)