944,017 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 2164
  • VB.NET RSS
Oct 19th, 2007
0

Screen Grab a Hidden Fom

Expand Post »
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

Domino.VBcoder
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
domino.vbcoder is offline Offline
7 posts
since Oct 2007
Oct 19th, 2007
0

Re: Screen Grab a Hidden Fom

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.bmp")
screenGrab.Save("C:\screenGrab.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)

End Sub
Reputation Points: 10
Solved Threads: 0
Newbie Poster
domino.vbcoder is offline Offline
7 posts
since Oct 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Checkbox Value in DataGridView
Next Thread in VB.NET Forum Timeline: Designing a form





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC