How can i make a screenshot at some specified coordinates, a rectangle coordinates?
I want to make a screensot only to a part of the screen.
I have tried with this code but it's not working as i need. The rest of the screen it's black...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(100, 100), ScreenSize) 'screenGrab.Save("C:\screenGrab.bmp") screenGrab.Save("C:\screenGrab.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)




Reply With Quote