- Joined
- Mar 26, 2007
- Sythe Gold
- 5
- Messages
- 125
Here is a very simple code to take screen shots in vb.net, you can also change this code to take only the window or even a control in the form in wan to do so
this code was taking from the planet planetsourcecode.com
Code:
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)
g.CopyFromScreen(New Point(0, 0), New Point(0, 0), ScreenSize)
screenGrab.Save("C:\screenGrab.bmp")
'or screenGrab.Save("C:\screenGrab.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
this code was taking from the planet planetsourcecode.com



