Z
zcjohnson
Unregistered / Unconfirmed
GUEST, unregistred user!
第二次进入文件时载入图象文件为何没有出现?
我在form.create中的代码如下
s:=myinifile.ReadString('image','path','');
if s<>'' then
begin
self.DoubleBuffered := True;
ImgsPlant.Picture.Bitmap.LoadFromFile(s); //just consider *.bmp
end;
而form.destroy中保存修改后的图象途径代码
const
imagename:string='plant.bmp';
当我第二次进入程序的时候希望看到第一次我修改好并保存的图象文件plant.bmp
但是却是没有看到,而且感觉窗体的image 部分做了一小会儿停顿,然后image 还是空白,没任何图象
begin
path:=ExtractFilePath(Application.ExeName);
myinifile.WriteString('image','filename',path+imagename);
在我INI文件如下部分:
[image]
filename=D:/documents and Settings/Administrator/My documents/plant/plant.bmp
我在form.create中的代码如下
s:=myinifile.ReadString('image','path','');
if s<>'' then
begin
self.DoubleBuffered := True;
ImgsPlant.Picture.Bitmap.LoadFromFile(s); //just consider *.bmp
end;
而form.destroy中保存修改后的图象途径代码
const
imagename:string='plant.bmp';
当我第二次进入程序的时候希望看到第一次我修改好并保存的图象文件plant.bmp
但是却是没有看到,而且感觉窗体的image 部分做了一小会儿停顿,然后image 还是空白,没任何图象
begin
path:=ExtractFilePath(Application.ExeName);
myinifile.WriteString('image','filename',path+imagename);
在我INI文件如下部分:
[image]
filename=D:/documents and Settings/Administrator/My documents/plant/plant.bmp