Found this on the bowels of my hard drive, change stream to file name/path if you want, i had it as a memory stream because i was using the screenshot function to upload a screenshot to a SQL server (Old anti-cheat project of mine)
have fun
have fun
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)
Dim stream As New MemoryStream
screenGrab.Save(stream, ImageFormat.Jpeg)




