Registriert seit: 26. Jan 2011
339 Beiträge
Delphi 12 Athens
|
AW: Textgröße (Windows 11, Barrierefreiheit)
22. Aug 2023, 09:17
Hallo,
habe das mal gefunden:
Code:
function GetUserFontPreference(var FaceName: string; var PixelHeight: Integer): Boolean;
var lf: LOGFONT;
begin
ZeroMemory(@lf, SizeOf(lf));
if SystemParametersInfo(SPI_GETICONTITLELOGFONT, sizeof(lf), @lf, 0) then
begin
FaceName:=PChar(Addr(lf.lfFaceName[0]));
PixelHeight:=lf.lfHeight;
result:=True;
end
else
result:=False;
end;
//
procedure TForm1.FormCreate(Sender: TObject);
var FontHeight: Integer;
FontFace: string;
begin
if GetUserFontPreference(FontFace, FontHeight) then
begin
Font.Name:=FontFace;
Font.Height:=FontHeight;
end;
end;
Beste Grüße
|
|
Zitat
|