System-wide Hotkey VK_SNAPSHOT

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 2064
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

System-wide Hotkey VK_SNAPSHOT

Post by AUGE_OHR »

hi,

i want to re-direct "Print Screen" Key.

this is easy for "own App" but what about System-wide :idea:
i like to watch if "Print Screen" Key is press ... how
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2064
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: System-wide Hotkey VK_SNAPSHOT

Post by AUGE_OHR »

hi,

i got it run this Way

Code: Select all

   HMG_CallDLL( "User32.DLL", DLL_OSAPI, "RegisterHotKey",Form_1.HANDLE,1,0,VK_SNAPSHOT)
   CREATE EVENT PROCNAME PrtScr_Detect() HWND Form_1.HANDLE STOREINDEX nIndex
   EventProcessAllHookMessage( nIndex, .T. )

   
Procedure On_Release
   HMG_CallDLL( "User32.DLL", DLL_OSAPI, "UnregisterHotKey",Form_1.HANDLE,1)
Return

FUNCTION PrtScr_Detect()
LOCAL nHWnd   := EventHWND()
LOCAL nMsg    := EventMSG()
LOCAL nWParam := EventWPARAM()
LOCAL nLParam := EventLPARAM()
LOCAL nMask, cDevice := ""

DO CASE
   case nMsg == WM_HOTKEY
      DO_SnapShot()
ENDCASE
RETURN NIL
but now it will "always" go to DO_SnapShot() when "Print Screen" is press ... :roll:
so i have to look for other Hotkey
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2064
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: System-wide Hotkey VK_SNAPSHOT

Post by AUGE_OHR »

hi,

i have made a SnapShot Tool which use "Print Screen" and can send a Email via CDO.
after Start it stay in System-Tray
HardCopy_TrayIcon.jpg
HardCopy_TrayIcon.jpg (8.52 KiB) Viewed 1491 times
Setup with DBF hold Data which CDO need to send via SMTP.
your Password will store "encrypt" to DBF

you will be ask to send Email (need in Germany DSGVO )
HARDCOPY.zip
(1.27 MiB) Downloaded 143 times
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2064
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: System-wide Hotkey VK_SNAPSHOT

Post by AUGE_OHR »

hi,

have clean up code so i can release source now
HBF12HLP.ZIP
(4.68 KiB) Downloaded 136 times
i don`t include my Icon in *.RC so fill it with your Icon
change Crypt Key in Setup.PRG ...

you can define any VK Key with RegisterHotKey()
HMG does not use F12 ... :idea:
have fun
Jimmy
Post Reply