PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → hot key
hot key
Débuté par Aad Gouka, 19 sep. 2004 12:42 - 2 réponses
Posté le 19 septembre 2004 - 12:42
Hi all,
Is there a way to define a hotkey once, that works in every window.
I want to define a hotkey, that makes a screenprint (jpg) of any window.
So when the focus is on window 1 then the hotkey makes an image of window 1
and when the focus is on window 2, an image of window 2 etc. etc etc.
Thanks for any help.
Aad
Posté le 19 septembre 2004 - 15:19
Hello Aad,
you can do this with the EVENT function
Example:
Do somewhere in the init of your project a
Event(":CaptureReq", "*.*", ::WM_KEYDOWN)
CaptureReq should be a method of your class to handle the screen capture and WM_KEYDOWN should be a constant in this class with the value 0x0100 (you can also include WINCONST.WL and KeyConst.wl in your class and then access the content with ::WM_KEYDOWN
The following is an example for CaptureReq
PROCEDURE CaptureReq (nMsg, wParam, lParam)
IF wParam = ::VK_F12 THEN
// Do the capture code and note, that all WinDev variables (MyWindow etc.) are available
END
HTH
Raimund
Hi all,
Is there a way to define a hotkey once, that works in every window.
I want to define a hotkey, that makes a screenprint (jpg) of any window.
So when the focus is on window 1 then the hotkey makes an image of window 1
and when the focus is on window 2, an image of window 2 etc. etc etc.
Thanks for any help.
Aad



http://www.invitec.com
Posté le 19 septembre 2004 - 15:57
Thanks Raimund,
I'm going to give it a try.
Aad
Hello Aad,
you can do this with the EVENT function
Example:
Do somewhere in the init of your project a
Event(":CaptureReq", "*.*", ::WM_KEYDOWN)
CaptureReq should be a method of your class to handle the screen capture and WM_KEYDOWN should be a constant in this class with the value 0x0100 (you can also include WINCONST.WL and KeyConst.wl in your class and then access the content with ::WM_KEYDOWN
The following is an example for CaptureReq
PROCEDURE CaptureReq (nMsg, wParam, lParam)
IF wParam = ::VK_F12 THEN
// Do the capture code and note, that all WinDev variables (MyWindow etc.) are available
END
HTH
Raimund
Hi all,
Is there a way to define a hotkey once, that works in every window.
I want to define a hotkey, that makes a screenprint (jpg) of any window.
So when the focus is on window 1 then the hotkey makes an image of window 1
and when the focus is on window 2, an image of window 2 etc. etc etc.
Thanks for any help.
Aad