Author: Jonas Bilinkevicius
How to hook into Windows' built-in screenshot function
Answer:
1 { ... }2 ifnot fullScreen then3 Keybd_Event(VK_MENU, 0, 0, 0);
4 Keybd_Event(VK_SNAPSHOT, 0, 0, 0);
5 Keybd_Event(VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0);
6 ifnot fullScreen then7 Keybd_Event(VK_MENU, 0, KEYEVENTF_KEYUP, 0);
8 { ... }
The fullScreen value tells, if you wish to get a windowed printscreen or the full screen.