| | |
Screen Grab a Hidden Fom
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2007
Posts: 7
Reputation:
Solved Threads: 0
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
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
•
•
Join Date: Oct 2007
Posts: 7
Reputation:
Solved Threads: 0
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
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
![]() |
Similar Threads
- datagrid delete function not auto update (ASP.NET)
- Garbled text (OS X)
- Subdirectory of local drive 'map' to a UNC? (Windows NT / 2000 / XP)
- Hi - I'm a programmer, write, editor - and busy.... (Community Introductions)
- How Would I take A Picture Of My Desktop And Post It At A Forum As An JPG? (Geeks' Lounge)
- Strange blank WinXP Login error message ... (Windows NT / 2000 / XP)
Other Threads in the VB.NET Forum
- Previous Thread: Checkbox Value in DataGridView
- Next Thread: Designing a form
| Thread Tools | Search this Thread |
.net 30minutes 2005 2008 access account arithmetic array basic bing button buttons c# center check code combobox component connectionstring convert crystalreport data database databasesearch datagrid datagridview date design dissertation dissertations dropdownlist excel fade file-dialog folder ftp generatetags google gridview hardcopy images inline input insert intel internet listview mobile monitor ms net networking objects output passingparameters peertopeervideostreaming picturebox picturebox1 plugin port print problem problemwithinstallation project remove save searchbox searchvb.net select serial server shutdown soap survey table tcp temperature text textbox timer toolbox trim update updown user vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web winforms wpf





