General information
Category:
Windows API functions
James,
If you are looking for the Keyboard repeat rate, the winAPI call SystemParametersInfo function in user32 will return this when passed the action constant:
SPI_GETKEYBOARDSPEED (#DEFINE SPI_GETKEYBOARDSPEED 10)
--At least if you can get it to work. I tried, and could not, but then my API calling knowledge in VFP is embryonic. The DECLARE I used is:
DECLARE INTEGER SystemParametersInfo IN user32 ;
LONG action , LONG @iParam , DOUBLE @oParam , LONG flags
I get the function to execute without error but it doesn't set my oParam. Here's my sample call:
LOCAL lu_speed
lu_speed = 50
ln_success = SystemParametersInfo(SPI_GETKEYBOARDSPEED,0, @lu_speed,0)
lu_speed should hold a value between 0 and 31 or rather would be a pointer to a variable holding the number. Instead, ln_success is 1 (for success) and lu_speed is still 50.
oParam would be a void pointer to a DWORD variable in C, but I don't know how to make it work from VFP. oParam points to different things depending on what you pass as the action to SystemParametersInfo. Its sort of a jack-of-all trades function.
Perhaps someone else can fill in the blanks for us, but that function will get the repeat rate.
(Note: I got a lot of this info from the MSDN library for Visual Studio 6, if you look up the SystemParametersInfo function there, you get the full syntax and parameter options-in C of course)
Sorry I couldn't be more helpful,
Bill
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only