Código:
Public Function SaveScreen(ByVal theFile As String) As Boolean
Try
Dim data As IDataObject = Clipboard.GetDataObject()
If data.GetDataPresent(GetType(System.Drawing.Bitmap)) Then
Dim bmp As Bitmap = CType(data.GetData(GetType(System.Drawing.Bitmap)), Bitmap)
bmp.Save(theFile, Imaging.ImageFormat.Png)
End If
Clipboard.SetDataObject(0) 'save memory by removing the image from the clipboard
Return True
Catch ex As Exception
Return False
End Try
End Function
Private Sub screenshot_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles screenshot.Click
SendKeys.Send("%{PRTSC}") '<alt + printscreen>
SaveScreen("C:\Galaxy Pictures\Img.jpeg")
End Sub
Osea yo quiero que entre:
Código:
SendKeys.Send("%{PRTSC}") '<alt + printscreen>
SaveScreen("C:\Galaxy Pictures\Img.jpeg")
Espero que me puedan ayudar.