strList := TStringList.Create;
if fileExists('upload.ini') then
begin
iniFile := TIniFile.Create('upload.ini');
iniFile.ReadSection('config',strList);
Memo1.Lines := strList;
iniFile.Free;
end
else showmessage('no ini file');upload.ini中的内容:[config]
ServerAddress=http://172.17.80.18:7001/Receive
ClientDirectory=D:\mydocument\DelphiProj\Project1
MaxUnitSize=1024
IsWriteLog=no
[proxy]
UseProxy=no
ProxServer=
ProxPort=
ProxUserName=
ProxPassword=运行结果是没有弹出对话框,memo1.text是空的,我特地让memo1.text值不为空的。请各位看看,哪里出错了
if fileExists('upload.ini') then
begin
iniFile := TIniFile.Create('upload.ini');
iniFile.ReadSection('config',strList);
Memo1.Lines := strList;
iniFile.Free;
end
else showmessage('no ini file');upload.ini中的内容:[config]
ServerAddress=http://172.17.80.18:7001/Receive
ClientDirectory=D:\mydocument\DelphiProj\Project1
MaxUnitSize=1024
IsWriteLog=no
[proxy]
UseProxy=no
ProxServer=
ProxPort=
ProxUserName=
ProxPassword=运行结果是没有弹出对话框,memo1.text是空的,我特地让memo1.text值不为空的。请各位看看,哪里出错了
thedir:String;getdir(0,thedir);
用
thedir+'\upload.ini'
代替 'upload.ini'
你说得很对,靠,这个破问题,真是气死我了,竟然会有这种事,唉!多谢pilicat(delphi迷) 兄,送分100!
同时提醒你一句,strList也需要释放