Hi Erol,
I have been tracking down a problem with an old app that if it crashes, it makes a mess of the clipboard and the closest I can come to fixing it is to close then clear the clipboard. The current test code,
rcall CloseClipboard ; close and clear the clipboard
rcall EmptyClipboard
rcall keybd_event,VK_SNAPSHOT,0, \
KEYEVENTF_EXTENDEDKEY,0 ; capture screen to clipboard
rcall SendMessage,HWND_BROADCAST, \
WM_CHAR,VK_SNAPSHOT,0 ; backup technique
Funny enough the "SendMessage" version also works OK but as it is placed in the message queue, its too slow. I included it to ensure the keyup was done correctly.