Article ID: 153003
Article Last Modified on 2/8/2005
DECLARE INTEGER keybd_event IN Win32API ;
INTEGER, INTEGER, INTEGER, INTEGER
VK_SNAPSHOT = 44 && from the winuser.h
VK_LMENU = 164
KEYEVENTF_KEYUP = 2
KEYEVENTF_EXTENDEDKEY = 1
The following commands copy the full windows desktop to the clipboard (the
equivalent of PrintScrn):
DOEVENTS keybd_event(VK_SNAPSHOT, 1, 0, 0 ) keybd_event(VK_SNAPSHOT, 1, KEYEVENTF_KEYUP, 0 ) DOEVENTSThe following commands copy the active application window to the clipboard (the equivalent of ALT+PrintScrn):
DOEVENTS keybd_event( VK_LMENU, 0, KEYEVENTF_EXTENDEDKEY, 0 ) && key down keybd_event( VK_SNAPSHOT, 0, KEYEVENTF_EXTENDEDKEY, 0 ) keybd_event( VK_SNAPSHOT, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 ) keybd_event( VK_LMENU, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 ) DOEVENTS
Additional query words: VFoxWin
Keywords: kb3rdparty KB153003