Change the keyboard repeat delay  

Send By: Q3 Team
Web : http://www.q3.nu
Email: dlib@q3.nu
Date: 29/07/99

Tip accessed 445 times

 


It is the delay for key autorepetition

To Change It:


 procedure TForm1.Button1Click(Sender: TObject);
 var
    Tiempo:integer;
 begin
   Tiempo:=2; {0, 1 or 2}
   SystemParametersInfo(SPI_SetKeyboardDelay,Tiempo,NIL,SPIF_SendWinIniChange);
 end;





To know their value:


 procedure TForm1.Button2Click(Sender: TObject);
 var
    Dato: integer;
 begin
   SystemParametersInfo(SPI_GetKeyboardDelay,0,@Dato,0);
   Label1.Caption:=IntToStr(Dato);
 end;



Ah!, with SPIF_SENDWININICHANGE the change makes it without recording it in the user's current configuration. If you want that the change will be permanent, put SPIF_UpdateIniFile