-
5
- #1
Stretchwickster
Programmer
I recently needed to automate an Alt-PrintScreen key press and, after much digging, found the following single-line does the job very well.
To simulate the ALT-PRINTSCREEN keyboard combination use this line i.e. to capture the active window:
To simulate the PRINTSCREEN keyboard button press use this line i.e. to capture the entire screen:
The Windows unit must be included to use this procedure.
For more info on this check out:
Hope people find this useful!
To simulate the ALT-PRINTSCREEN keyboard combination use this line i.e. to capture the active window:
Code:
keybd_event(VK_SNAPSHOT, 1, 0, 0);
To simulate the PRINTSCREEN keyboard button press use this line i.e. to capture the entire screen:
Code:
keybd_event(VK_SNAPSHOT, 0, 0, 0);
The Windows unit must be included to use this procedure.
For more info on this check out:
Hope people find this useful!