全国高等专科学校:关于Delphi中程序初始化问题

来源:百度文库 编辑:高校问答 时间:2024/05/17 14:35:32
如果将窗体颜色以 $00000000(或者clWindowText) 方式存储在INI文件中,用form1.Color:=sys.ReadString('System','ExeColor','');方式读取颜色的话会提示incompatible types:'TColor' and 'String'的错误信息,我该怎么做才能将颜色值正确的赋给form1.color呢?

Form1.Color:=StringToColor(Sys.ReadString('System','ExeColor','clBtnFace'));

form1.Color:=StrToInt(sys.ReadString('System','ExeColor',''));