VB.NET Window Screen Capture (ALT+PRINTSCREEN)

前端 未结 5 1416
渐次进展
渐次进展 2021-01-03 02:25

I found that code somewhere and I find it quite useful but I would like to find a way to make it work so it capture only the given window target. Maybe with a processID or W

5条回答
  •  感情败类
    2021-01-03 03:01

    This will give you the Alt + Printscreen, showing only front most application.

    SendKeys.Send("%{PRTSC}") 
    

    Then continue the normal way:

    Dim Screenshot As Image = Clipboard.GetImage()
    Screenshot.Save("c:\ScreenShot.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
    

提交回复
热议问题