ATOUTFOX COMMUNAUTÉ FRANCOPHONE DES PROFESSIONNELS FOXPRO Visual FoxPro : le développement durable |
|||||||||||||
|
|||||||||||||
NoPrintScreen |
|||||||||||||
|
|||||||||||||
www.atoutfox.org - Site de la Communauté Francophone des Professionnels FoxPro - v3.4.0 - © 2004-2024. |
Possible en VFP en appelant directement l'API :
#DEFINE MOD_ALT 1
#DEFINE MOD_CONTROL 2
#DEFINE VK_SNAPSHOT 0x2C
FUNCTION SnapShot
LPARAMETERS lOn
LOCAL nLibs
LOCAL ARRAY aLibs(1,3)
M.nLibs = ADLLS(aLibs)
IF M.lOn
IF M.nLibs = 0 OR ASCAN(aLibs,"UnregisterHotKey",1,0,1,7) = 0
DECLARE INTEGER UnregisterHotKey IN Win32API ;
INTEGER hWnd, INTEGER id
ENDIF
UnregisterHotKey(_SCREEN.HWnd, 1002)
UnregisterHotKey(_SCREEN.HWnd, 1003)
UnregisterHotKey(_SCREEN.HWnd, 1004)
ELSE
IF M.nLibs = 0 OR ASCAN(aLibs,"RegisterHotKey",1,0,1,7) = 0
DECLARE INTEGER RegisterHotKey IN Win32API ;
INTEGER hWnd, INTEGER id,;
INTEGER fsModifiers, INTEGER vk
ENDIF
RegisterHotKey(_SCREEN.HWnd, 1002, 0, VK_SNAPSHOT)
RegisterHotKey(_SCREEN.HWnd, 1003, MOD_CONTROL, VK_SNAPSHOT)
RegisterHotKey(_SCREEN.HWnd, 1004, MOD_ALT, VK_SNAPSHOT)
ENDIF
RETURN