在winform里调用了AxMediaPlayer控件,希望在开始播放时自动全屏,停止后恢复到原来大小。
用fullscreen属性=true,却说是灾难性事故
在属性里设置全屏播放,第一次可以全屏,第二次按播放按钮时却不能自动全屏了。如何控制全屏播放呢,出血跪求!!!
用fullscreen属性=true,却说是灾难性事故
在属性里设置全屏播放,第一次可以全屏,第二次按播放按钮时却不能自动全屏了。如何控制全屏播放呢,出血跪求!!!
解决方案 »
- 应用程序如何使用图片呢?
- 请问怎么判断一个文件流是否是空流。
- ADO.net中数据更新问题
- “当前不会命中断点 还没有为该文档加载任何符号”
- 关于sql语句参数传递
- 请高手帮忙二个大容量dataset数据比较速度问题
- 各位大虾 如何用C#将变量复制到Windows下的剪切板里啊??
- 泛型集合TrimExcess方法重新分配内存后原来的内存会立刻释放么?
- ListView.Groups有没有办法折叠起来?(winform)
- 在VC中的写了个 dll, 返回一个字符串(CString类型),C#中如何使用?
- C#中用const定义常量的一点疑惑
- 小弟愚笨今天才发现在javascript 中可以访问服务端控件的值
this.axWindowsMediaPlayer1.fullScreen = true;只有在播放开始以后才可以用。附:
The fullScreen property gets or sets a value indicating whether video content is played in full-screen mode. Copy Code[Visual Basic]
Public Overridable Property fullScreen As Boolean[C#]
public virtual bool fullScreen {get; set;}
Property ValueA System.Boolean value that indicates whether content is played in full-screen mode. The default value is false.ResFor full-screen mode to work properly when embedding the Windows Media Player control, the video display area must have a height and width of at least one pixel. If uiMode is set to "mini" or "full", the height of the control itself must be 65 or greater to accommodate the video display area in addition to the user interface.If uiMode is set to "invisible", then setting this property to true raises an error and does not affect the behavior of the control.During full-screen playback, Windows Media Player hides the mouse cursor when enableContextMenu equals false and uiMode equals "none".If uiMode is set to "full" or "mini", Windows Media Player displays transport controls in full-screen mode when the mouse cursor moves. After a brief interval of no mouse movement, the transport controls are hidden. If uiMode is set to "none", no controls are displayed in full-screen mode. Note Displaying transport controls in full-screen mode requires the Windows XP operating system.If transport controls are not displayed in full-screen mode, then Windows Media Player automatically exits full-screen mode when playback stops.
例如:
if( yourPlayer.status == "Playing" )
yourPlayer.fullScreen = true;
{
mp.URL=@"C:\Documents and Settings\Administrator\桌面\1.avi";
mp.Ctlcontrols.play();
}private void cmdback_Click(object sender, System.EventArgs e)
{
mp.Ctlcontrols.stop();
}第一次播放是能够全屏,播放完成后会恢复大小,正常的
第二次播放时就不能自动全屏了,要双击才行,怎么回事?
this.wmpPlay.StatusChange += new System.EventHandler(this.wmpPlay_StatusChange);
private void wmpPlay_StatusChange(object sender, System.EventArgs e)
{
Debug.WriteLine( wmpPlay.status );
if( wmpPlay.status == "Playing" )
wmpPlay.fullScreen = true;
}
正在连接...
正在播放
正在播放
已完成
打开媒体
已停止
mp.fullScreen = true;这样就可以了看来渔翁的法子是对的,多谢啦!!!可是为什么一定每次都要设置fullscreen属性呢?
现在接贴窗口也半天了没打开大家是不是也一样啊???