10-07-2011 05:16 PM
I have a Windows Media Player object in a tab control, so even if I manualy resize the video a split second after it starts to play it still expands my tab control well beyond the normal bounds. Looking in the class browser there are a number of height and width properties that are unser other sub classes (Not IWMPPlayer4). The front panel control is only associated with IWMPPlayer4, is there anyway to apply the properties from the parent class.
In LabVIEW ref classes I would just use to more generic class, but that does not work for ActiveX. Any ideas on how I can set the size in windows media player and not just in LabVIEW?
10-31-2011 10:27 AM
I believe LabVIEW can't control the WMP size. I tried different approaches and could not fix this issue either. This is an internal LabVIEW issue.
12-07-2011 08:00 PM - edited 12-07-2011 08:04 PM
I was looking for the answer to the same question today. I figured out the basic control, and thought I should upload the VI to help the less experienced.
Media Player does not seem to behave great in LabVIEW. It appears to reset itself every time you start it, stop it, pause it, or carry out any other action. So you will need a driver VI that handles each possible case, and re-applies the desired properties every time the user carries out an action.
At least that's how I imagine it. Any other better ideas or implemented code are very welcome!
12-08-2011 12:41 PM - edited 12-08-2011 12:42 PM
I tested your code and it seems that WMP still resets its size. Also the Show Controls button does not do anything - maybe it's a Windows 7 WMP issue?
I attached the screenshots below.
03-17-2013 06:15 PM
The uiMode property specifies or retrieves a value indicating which controls are shown in the user interface.
mini | Windows Media Player is embedded with the status window, play/pause, stop, mute, and volume controls shown in addition to the video or visualization window. |
10-21-2013 08:45 PM
Hi all,
I am troubled with the same problem.
When IWMPPlayer4 starts play, IWMPPlayer4 seems to change the size of the control. Even a pause was resized.
Is there the method to stop this resize? Or are there other methods to evade?
--
gogomac
05-21-2015 04:30 PM
I'm having the same problem. Has anybody found a solution yet?
Thanks.
08-30-2023 12:44 AM
Hi, I can't change it to write the windows media player properties nodes with height and width....
07-12-2024 06:29 PM
Same problem and no I've never found a solution. I've tinkered with every property node that looks like it would affect the size.
07-14-2024 02:22 AM
Well, as suggested, the container bounds property for the ActiveX container (apparently combined with the control's StretchToFit property) seems to control this and there is code in this thread from 2011 demonstrating this, but it does seem to require executing after every resize rather than keeping the player size fixed. You could possibly make that example more elegant by registering for the PlayStateChange event or checking to see if there is a resize event and reacting to that.
I have no experience with embedding video in LV, but I would guess these are some options: