Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keyboard tic (repeat) interval
Message
De
17/11/1999 12:37:18
 
 
À
16/11/1999 10:54:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00291475
Message ID:
00291983
Vues:
17
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform