ich möchte Font Eigenschaften eines Form wegspeichern und auch wieder zurückschreiben.
Dabei tritt ein Problem auf.
Code: Alles auswählen
procedure TForm1.Button1Click(Sender: TObject);
var
Schriftart : string;
Schriftgr : string;
Schriftfarbe: string;
begin
if FontDialog1.Execute then
begin
Schriftart := FontDialog1.Font.CharSet.ToString;//<= funktioniert nicht
Schriftgr := FontDialog1.Font.Height.ToString;
Schriftfarbe:= ColorToString(FontDialog1.Font.Color);
end;
//Schriftart Schriftgr Schriftfarbe abspeichern und Lesen aus ini Datei
Form1.Font.CharSet:= Schriftart;//<= wie CharSet aus string machen ?
Form1.Font.Height := StrToInt(Schriftgr);
Form1.Font.Color := StringToColor(Schriftfarbe);
end;
Was Mache ich hier falsch ?
Gruß Frank