I have a control, VideoControl, which displays video using DirectShow – it’s set as the owner of an IVideoWindow. I have another control, AreaControl, which is supposed to show a dashed rectangle over the video control. AreaControl is set to be transparent using SetStyle(ControlStyles.SupportsTransparentBackColor, true). If I place AreaControl over any other control, it works as expected, showing a dashed rectangle over the controls behind it. But when I place the dashed rectangle control over the video control, the AreaControl is filled in with the VideoControl’s BackColor.
What do I need to do to get the video to display through the AreaControl, with the dashed rectangle overlaid on it? Is there a way to get the VideoControl to paint itself with the video, rather than just drawing its BackColor?
In the end the answer to this turned out to be to use the AreaControl’s Region property, since we didn’t need partial transparency.