` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Set NumLock from Clarion app
2008-04-25 -- Daan Marais
 
Ok, found the answer I was looking for in comp.lang.clarion, quoted here for completeness: (credit to Markku Niskanen) Module ('Win API') GetKeyboardState(*CSTRING),RAW,PASCAL SetKeyboardState(*CSTRING),LONG,RAW,PASCAL end Global Variables KeyboardState Cstring(257) For your window or application, whichever you wish, set the Timer value to 10 or something like that (that is, the timer message is received every 1/10 seconds, which should be sufficient). Add to the Timer embed the following code: GetKeyBoardState(KeyBoardState) ! Get state to buffer KeyboardState[91H] =80H ! Result# = SetKeyboardState(KeyboardState) ! Set state And that will do the trick!! He (later) adds: MSDN says 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 lights on the keyboard etc etc


Today is May 3, 2024, 5:05 pm
This article has been viewed 35116 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: