This project is read-only.

WindowRenderer pops up ActiveMovie Window

Topics: User Forum
Apr 21, 2011 at 2:50 PM
Edited Apr 21, 2011 at 2:56 PM

Hi,

I'm trying to play a video using the WindowRenderer.  I've created a simple WinForms program based on the SampleTimeWatermarkParticipantFixture test program.  Instead of a WindowsMediaRenderer, I use a WindowRenderer.  The program runs and plays the movie, but it pops up in an "ActiveMovie Window".  If I specify IntPtr.Zero for the window handle, the movie pops up in a "Video Rendering Window".  In either case, neither the movie window nor my program's window can be moved while the video plays.

I'm using Windows XP SP3 and I have installed the DirectX End-User Runtimes (June 2010).

I am able to run the DirectShow NET samples, eg. PlayWnd.

Thanks for any help on this problem, and thanks for this great project!

Apr 22, 2011 at 10:23 AM
Edited Apr 22, 2011 at 10:24 AM

I found a partial fix.  Made some changes to WindowRenderer.cs that remove the window decoration of the "ActiveMovie Window":

// insert this code right after videoWindow.put_Owner(windowHandle)
videoWindow.put_WindowStyle(WindowStyle.Child | WindowStyle.Visible | WindowStyle.ClipSiblings | WindowStyle.ClipChildren);

videoWindow.put_Top(0);
videoWindow.put_Left(0);

Now the video is played inside my PictureBox control.

One problem that remains: while the video is playing, my application is totally unresponsive to user input.  The window cannot be moved, it cannot even be closed.  I'll try to find out if I need to create a thread to play the video.

Any thoughts and tips (or sample code using the WindowRenderer) are very welcome!