Activemovie窗口在C#中弹出Microsoft.DirectX.AudioVideoPlayback [英] Activemovie window pop up Microsoft.DirectX.AudioVideoPlayback in C#
问题描述
我创建了一个简单的Windows窗体,该窗体使用Microsoft.DirectX.AudioVideoPlayback显示视频.当视频加载到面板上时,它会在活动电影窗口中弹出毫秒.我如何解决它,因为每次开始播放视频时都会烦人,因此会抛出此activemovie窗口.就像应用程序有延迟一样.
I had create a simple windows form which display a video with Microsoft.DirectX.AudioVideoPlayback. When the video load to the panel, it pop up for milliseconds a activemovie window. How i could fix it because it is annoy every time start playing a video throws this activemovie window. It is like the application have delay.
这是我的代码:
string path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"Photos\test.avi");
var ofd = path;
var video = new Video(ofd, true);
label3.Text = ofd;
video.Owner = panel2;
panel2.Size = new System.Drawing.Size(640,480);
video.Ending += new EventHandler(videocountdown_Ending);
video.Size = new System.Drawing.Size(640, 480);
当我按下播放视频的按钮时,它是一个打印屏幕.我将其裁剪,并且只向您显示此图片中的面板.
Above it is a printscreen when i press the button which play the video. I crop it and i show you only the panel in this picture.
推荐答案
video = new Video(ofd, true);
video.Owner = panel2;
那么您在绑定到面板之前自动运行它吗?我想您想换一种方式:先创建,然后是Owner
,然后是Play
.
So you auto-run it before binding to the panel? I suppose you want it the other way: create, then Owner
thing, then Play
.
video = new Video(ofd, false);
video.Owner = panel2;
video.Play();
没有UI初始化的播放使视频渲染器将视频渲染到专用弹出窗口中,该窗口具有历史性标题"ActiveMovie" ,即将庆祝20周年...
Playback without UI initialization makes the video renderer to render video into private popup window, which has a historic caption "ActiveMovie", which is soon to celebrate 20 year anniversary...
这篇关于Activemovie窗口在C#中弹出Microsoft.DirectX.AudioVideoPlayback的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!