Page 1 of 1
Windows Key?
Posted: Fri Dec 06, 2013 8:05 pm
by Roberto Lopez
Hi All,
Had someone managed to 'trap' The Windows key to assign it to a specific procedure?
TIA.
Re: Windows Key?
Posted: Fri Dec 06, 2013 8:39 pm
by esgici
Hello Roberto
Roberto Lopez wrote:
Had someone managed to 'trap' The Windows key to assign it to a specific procedure?
I hope that
this is what you are looking for
With my best regards

Re: Windows Key?
Posted: Sat Dec 07, 2013 12:04 am
by srvet_claudio
Hi Roberto.
Please,
comment this macro (line 49) in SOURCE\h_windows.prg
#define ALLOW_ONLY_ONE_MESSAGE_LOOP
and re-build HMG.3.1.5
Changelog HMG.3.1.5
Code: Select all
- New Read Keyboard Functions (Contributed by Dr. Claudio Soto)
- HMG_GetLastVirtualKeyDown ( [ @hWnd ], [ @nMsg ], [ @wParam ], [ @lParam ] ) --> nVK_Code
- HMG_GetLastVirtualKeyUp ( [ @hWnd ], [ @nMsg ], [ @wParam ], [ @lParam ] ) --> nVK_Code
- HMG_GetLastCharacter ( [ @hWnd ], [ @nMsg ], [ @wParam ], [ @lParam ] ) --> cCharacter
- HMG_CleanLastVirtualKeyDown ( [ lCleanAll ] )
- HMG_CleanLastVirtualKeyUp ( [ lCleanAll ] )
- HMG_CleanLastCharacter ( [ lCleanAll ] )
- HMG_GetLastVirtualKeyName ( [ lParam ] ) --> cVK_Name
- HMG_VirtualKeyIsPressed ( VK_Code )
- GetKeyState ( VK_Code ) --> return nKeyState
- HMG_SendCharacter ( [ hWnd ], cText )
- HMG_EnableReadKey()
- HMG_DisableReadKey()
- New Handle: Form/Control property (To use in combination with Read Keyboard functions (Contributed by Dr. Claudio Soto)
- Form.HANDLE --> equivalent to: GetFormHandle ( cForm )
- Form.Control.HANDLE --> equivalent to: GetControlHandle ( cControl, cForm )
- GetFormNameByHandle ( hWnd, @cFormName, @cFormParentName ) --> Return nFormIndex
- GetControlNameByHandle ( hWnd, @cControlName, @cFormParentName ) --> Return nControlIndex
See this demo:
download/file.php?id=3337
Best regards,
Claudio.
PS: The code of the Keyboard Functions is in SOURCE\h_windows.c
Re: Windows Key?
Posted: Sat Dec 07, 2013 4:05 pm
by Roberto Lopez
esgici wrote:Hello Roberto
Roberto Lopez wrote:
Had someone managed to 'trap' The Windows key to assign it to a specific procedure?
I hope that
this is what you are looking for
With my best regards

Thanks!
Re: Windows Key?
Posted: Sat Dec 07, 2013 4:06 pm
by Roberto Lopez
srvet_claudio wrote:Hi Roberto.
Please,
comment this macro (line 49) in SOURCE\h_windows.prg
#define ALLOW_ONLY_ONE_MESSAGE_LOOP
and re-build HMG.3.1.5
<...>
See this demo:
download/file.php?id=3337
Best regards,
Claudio.
PS: The code of the Keyboard Functions is in SOURCE\h_windows.c
Muchas Gracias Claudio!
Saludos,
Roberto.