Using Win32 functions in Visual FoxPro Image Gallery
Keyboard Input
..msdn
ActivateKeyboardLayout
BlockInput
EnableWindow
GetActiveWindow
GetAsyncKeyState
GetFocus
GetKBCodePage
GetKeyboardLayout
GetKeyboardLayoutList
GetKeyboardLayoutName
GetKeyboardState
GetKeyNameText
GetKeyState
IsWindowEnabled
keybd_event
MapVirtualKey
RegisterHotKey
SetFocus
SetKeyboardState
ToAscii
UnregisterHotKey
VkKeyScan
Code examples:
Reading the state of mouse buttons within DO WHILE loop
SetKeyboardState
..msdn    Add comment     W32 Constants      Translate this page
The SetKeyboardState function copies a 256-byte array of keyboard key states into the calling thread"s keyboard input-state table.
Code examples:
Reading the state of mouse buttons within DO WHILE loop
Declaration:
BOOL SetKeyboardState(
    LPBYTE lpKeyState
);
FoxPro declaration:
DECLARE INTEGER SetKeyboardState IN user32;
    STRING @ lpKeyState
Parameters:
lpKeyState
[in] Pointer to a 256-byte array that contains keyboard key states.
Return value:
If the function succeeds, the return value is nonzero.
My comment:
This is the same table accessed by the GetKeyboardState and GetKeyState functions. Changes made to this table do not affect keyboard input to any other thread.

Because the SetKeyboardState function alters the input state of the calling thread and not the global input state of the system, an application cannot use SetKeyboardState to set the NUM LOCK, CAPS LOCK, or SCROLL LOCK (or the Japanese KANA) indicator lights on the keyboard. These can be set or cleared using SendInput to simulate keystrokes.
Word Index links for the SetKeyboardState :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2004-07-15 09:24:59
Modified: 2004-07-15 09:27:19
Visited in last 7 days: 22
User Contributed Notes:
Baltazar Ramirez | 2005-08-31 12:07:08
I'am trying to block the ctrl+esc keys,is there a way
to do this ?

thanks in advance
A.M. | 2005-08-31 16:34:03
Windows NT 4.0 Service Pack 3 and later Windows 2000 Applications can disable ALT+TAB or CTRL+ESC by
installing a low-level keyboard hook. A low-level keyboard hook is installed by calling SetWindowsHookEx.

The SetWindowsHookEx requires callback function as a parameter -- can not be achieved in direct VFP code.

Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.82.79.109)
17 sec.Function: 'getservbyname'
36 sec.Function: 'SQLFreeHandle'
54 sec.Function: 'UrlGetPart'
1.2 min.Function: 'CertFreeCertificateContext'
1.52 min.Function: 'EnumPrinterData'
1.83 min.Function: 'waveInUnprepareHeader'
2.17 min.Function: 'JetCreateInstance'
2.47 min.Function: 'GetCursorInfo'
2.82 min.Function: 'gethostname'
3.13 min.Function: 'SQLSetConfigMode'
Google
Advertise here!