Activemovie window pop up Microsoft.DirectX.AudioV

2019-08-13 23:15发布

问题:

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.

Here is my code :

   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.

回答1:

video = new Video(ofd, true);
video.Owner = panel2;

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();

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...