Hi, i need to make a screen capture... but just of a web browser control...
i got everything but how to get JUST the web control..
thanks :)
Printable View
Hi, i need to make a screen capture... but just of a web browser control...
i got everything but how to get JUST the web control..
thanks :)
try this:
vb Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim img As New Bitmap(WebBrowser1.ClientSize.Width + 2, WebBrowser1.ClientSize.Height + 2) Dim gr As Graphics = Graphics.FromImage(img) Dim p As Point = WebBrowser1.PointToScreen(New Point(0, 0)) p.Offset(-1, -1) gr.CopyFromScreen(p, New Point(0, 0), WebBrowser1.Size) img.Save("filename", Drawing.Imaging.ImageFormat.Jpeg) Process.Start("filename") End Sub