I am trying to create screenshots of a powerpoint presentation using mij application. This is not the biggest issue. I have managed to do so with the following code
Bitmap memoryImage = new Bitmap(rc.Width, rc.Height,
PixelFormat.Format32bppArgb);
using (Graphics memoryGrahics =
Graphics.FromImage(memoryImage))
{
memoryGrahics.CopyFromScreen(rc.X, rc.Y,
0, 0, rc.Size, CopyPixelOperation.SourceCopy);
}
return new Bitmap(memoryImage, 800, 600);
But, when a video file is being played it only shows a black square. It seems like the media is played on a different layer en thus not captured.
How can i create a screenshot with an image of the video? I searched alot about directx or windowsapicodepack but i don't exactly know if it is the right way to do this