locked
Black frame around image when moving picture around RRS feed

  • Question

  • I have a panel on a Windows Forms form that is used to show webcam images. I capture the images from my webcam using DirectShow. To attach the image to the panel i use the code shown below:

    videoWindow.put_Owner(panel.Handle);

     

    videoWindow.put_WindowStyle(WindowStyle.Child | WindowStyle.ClipChildren);

     

    videoWindow.put_Visible(

    OABool.True);
     

    videoWindow.SetWindowPosition(0, 0, panel.Width, panel.Height);

    The above works fine when the form is located on the same X,Y position on the screen. The problem occurs when moving my form around. This resolved in the panel to draw a black frame until the webcam image is repainted. Is there any way to get rid of this?

    Br

    AHR

    Thursday, June 16, 2011 2:55 PM