Change the Windows border width  

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

Tip accessed 482 times

 


This code will change the border width in all the system


 procedure TForm1.Button2Click(Sender: TObject);
 var
    Dato: TNonCLientMetrics;
 begin
   Dato.cbSize:=SizeOf(Dato);
   SystemParametersInfo(SPI_GetNonClientMetrics,0,@Dato,0);
   Dato.iBorderWidth:=1; {Ancho del Borde}
   SystemParametersInfo(SPI_SetNonClientMetrics,0,@Dato,SPIF_SENDWININICHANGE);
 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