X
xxjssoft
Unregistered / Unconfirmed
GUEST, unregistred user!
我的程序中有一个让客户选择软件皮肤的窗体,共有八个皮肤选项,用的是8个RadioButton
我连续多次选择皮肤文件,并应用,然后退出程序,再次进入程序,再选择皮肤文件,应用.
这样连续运行多次,大概是6~7次后,发现SelectSkinFrm上面的8个RadioButton都不见了,
但用鼠标点所在位置后,又出现了,不知是什么原因?请各位大侠帮我分析原因,不胜感激!
代码如下 :
procedure TSelectSkinFrm.BitBtn1Click(Sender: TObject);
var
iniinfo3:TiniFile;
path3:String;
begin
path3:=ExtractFilePath(Application.ExeName);
try
iniinfo3:=TIniFile.Create(path3+'/system.ini');// 打开INI文件
//Form1.sd1.InitialDir := path + '/skins';
if RadioButton1.Checked then
Form1.sd1.SkinFile := path3+'/skins'+'/海洋之心.skn'
else if RadioButton2.Checked then
Form1.sd1.SkinFile := path3+'/skins'+'/蓝色魅力.skn'
else if RadioButton3.Checked then
Form1.sd1.SkinFile := path3+'/skins'+'/科技时代.skn'
else if RadioButton4.Checked then
Form1.sd1.SkinFile := path3+'/skins'+'/黑客帝国.skn'
else if RadioButton5.Checked then
Form1.sd1.SkinFile := path3+'/skins'+'/蓝天白云.skn'
else if RadioButton6.Checked then
Form1.sd1.SkinFile := path3+'/skins'+'/雅致之魅.skn'
else if RadioButton7.checked then
Form1.sd1.SkinFile := path3+'/skins'+'/淡紫之韵.skn'
else if RadioButton8.Checked then
Form1.sd1.skinFile := path3+'/skins'+'/绿色原野.skn';
iniInfo3.WriteString ('skin', 'skinFile', Form1.sd1.SkinFile);
Finally
freeAndNil(IniInfo3);
end;
end;
我连续多次选择皮肤文件,并应用,然后退出程序,再次进入程序,再选择皮肤文件,应用.
这样连续运行多次,大概是6~7次后,发现SelectSkinFrm上面的8个RadioButton都不见了,
但用鼠标点所在位置后,又出现了,不知是什么原因?请各位大侠帮我分析原因,不胜感激!
代码如下 :
procedure TSelectSkinFrm.BitBtn1Click(Sender: TObject);
var
iniinfo3:TiniFile;
path3:String;
begin
path3:=ExtractFilePath(Application.ExeName);
try
iniinfo3:=TIniFile.Create(path3+'/system.ini');// 打开INI文件
//Form1.sd1.InitialDir := path + '/skins';
if RadioButton1.Checked then
Form1.sd1.SkinFile := path3+'/skins'+'/海洋之心.skn'
else if RadioButton2.Checked then
Form1.sd1.SkinFile := path3+'/skins'+'/蓝色魅力.skn'
else if RadioButton3.Checked then
Form1.sd1.SkinFile := path3+'/skins'+'/科技时代.skn'
else if RadioButton4.Checked then
Form1.sd1.SkinFile := path3+'/skins'+'/黑客帝国.skn'
else if RadioButton5.Checked then
Form1.sd1.SkinFile := path3+'/skins'+'/蓝天白云.skn'
else if RadioButton6.Checked then
Form1.sd1.SkinFile := path3+'/skins'+'/雅致之魅.skn'
else if RadioButton7.checked then
Form1.sd1.SkinFile := path3+'/skins'+'/淡紫之韵.skn'
else if RadioButton8.Checked then
Form1.sd1.skinFile := path3+'/skins'+'/绿色原野.skn';
iniInfo3.WriteString ('skin', 'skinFile', Form1.sd1.SkinFile);
Finally
freeAndNil(IniInfo3);
end;
end;