Эта VB.Net имитирует нажатие клавиши Print Screen.
Создание PrintScreen.vb на рабочем столе.
Imports System.Runtime.InteropServices
Imports System.Windows.Forms
Public Module SendWinKey
Const KEYEVENTF_KEYDOWN As Integer = &H0
Const KEYEVENTF_KEYUP As Integer = &H2
Declare Sub keybd_event Lib "User32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As UInteger, ByVal dwExtraInfo As UInteger)
Public Sub Main()
keybd_event(CByte(Keys.PrintScreen), 0, KEYEVENTF_KEYDOWN, 0) 'press the print screen key down
keybd_event(CByte(Keys.PrintScreen), 0, KEYEVENTF_KEYUP, 0) 'release the print screen key
End Sub
End Module
Затем введите
C:\Windows\Microsoft.NET\Framework\v4.0.30319\vbc "%userprofile%\desktop\PrintScreen.vb" /out:"%userprofile%\Desktop\PrintScreen.exe" /target:winexe