Hi all i was wondering wheather anyone could help me with doing a screen grab on a hidden form? i dont have a clue where to start!

The idea is i have a form with a webbrowser control on it, the form is hidden and when i send a command to the form, for it to take a screen shot of the browser control and save it out as a JPEG.

Could someone point me in the right direction please.

i am using VB.net 2005

Many Thanks


ok i got this far but this grabs the entire screen, i just want to grab an image from a .net web browser that is hidden behind another form.

Dim ScreenSize As Size = New Size(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height)
Dim screenGrab As New Bitmap(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height)
Dim g As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(screenGrab)

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

g.CopyFromScreen(New Point(0, 0), New Point(0, 0), ScreenSize)
screenGrab.Save("C:\screenGrab.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)

End Sub