>#DEFINE VK_SNAPSHOT 0x2c > >DECLARE INTEGER GetAsyncKeyState IN user32 INTEGER vKey >? GetAsyncKeyState(VK_SNAPSHOT) >>If PrtScr has been recently pressed, the GetAsyncKeyState returns 1. Though you have to call this function in a cycle or through a timer to react to this event.
>DECLARE INTEGER RegisterHotKey IN user32; > INTEGER hWnd, INTEGER id,; > INTEGER fsModifiers, INTEGER vk >>The first parameter is the handle to a window. That can be either FoxPro form or the main Visual FoxPro window. For example:
>LOCAL hWindow >hWindow = _Screen.HWnd >= RegisterHotKey(hWindow, 0, 0, VK_SNAPSHOT) >* ... somewhere later ... >= UnregisterHotKey(hWindow, 0) >>After the RegisterHotKey returns, this window starts receiving WM_HOTKEY message each time the PrtScr key is pressed. Not much you can get from this fact in VFP8 unless you use some FLLs.