have this code i found
Put i get this error on the screenGrab.Save partCode: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:\" & Label1.Text & ".jpeg")
Any hellp or can someone give me different code that works. I want the screenshot to take and save upon mouse clickCode:A generic error occurred in GDI+.




Reply With Quote