日期:2014-05-18  浏览次数:21066 次

c# winform 调用media player控件播放视频如何全屏
我现在知道拖media player控件到窗体能方便的创建一个播放器,通过StretchToFit可以设置拉伸画面使适合播放器大小,但是这个属性好像无效啊,我怎么设置都不能是画面全屏~~~~~~~~~~~
我需要画面全屏,无论拉伸多么变形只要能充满播放器窗口就行(有特殊需要)~~~

请前辈赐教如何设置这个控件才能使画面充满屏幕(现在实验StretchToFit无效)

------解决方案--------------------
StretchToFit的解释,会有黑边的。

When stretchToFit is set to true, the Windows Media Player control maintains the original aspect ratio of the video. If the aspect ratio of the video does not match the aspect ratio of the video window, black mask areas may appear on either the top and the bottom, or left and right, of the video image.

This property applies to the Windows Media Player control only when embedded in a Web page.
------解决方案--------------------
1)设置在Media Player在父窗体中的Dock=Fill
2)设置父窗体的FormBoradStyle=None
你应该能看到想要的结果了.
------解决方案--------------------
恐怕media player自己就不支持改aspect ratio。
试一试其它控件吧

有人推荐VLC Media Player