How can I get a screenshot a the AxWebBrowser instance in C#?
I am creating an instance of AxWebBrowser in a win forms app because I need it to render flash. How can开发者_如何学JAVA take a screenshot of the page it's rendered in C#?
Cant you just use
Graphics g = Graphics.FromImage(myImage);
g.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy);
.. obviously with the dimensions etc of your window? Never tried it but I cant imagine why it wouldnt work.
精彩评论