procedure TForm1.Button1Click(Sender: TObject);
var
ncm: TNonClientMetrics;
begin
ncm.cbSize := SizeOf(TNonClientMetrics);
{get old non client metrics}
SystemParametersInfo(SPI_GETNONCLIENTMETRICS, SizeOf(TNonClientMetrics), @ncm, 0);
{
lfCaptionFont - regular captions
lfSmCaptionFont - small captions
lfMenuFont - menus
lfStatusFont - status bars
lfMessageFont - message boxes
}
ncm.lfMessageFont.lfFaceName := 'Tahoma';
{set new non client metrics}
SystemParametersInfo(SPI_SETNONCLIENTMETRICS, SizeOf(TNonClientMetrics), @ncm, 0);
end;
|