学习型 ASP/PHP/ASP.NET 主机 30元/年全能 ASP/PHP/ASP.NET 主机,支持月付专业 MSSQL 数据库空间,支持月付专业 MySQL 数据库空间,支持月付
发新话题
打印

delphi 路径问题,请高手指教

delphi 路径问题,请高手指教

procedure TForm4.ComboBox2Change(Sender: TObject);
begin

if combobox2.Text='外科' then
begin
combobox3.Items.LoadFromFile('d:\外科主治医生.txt');
end
else if   combobox2.Text='内科' then
begin
combobox3.Items.LoadFromFile('d:\内科主治医生.txt');
end
else if   combobox2.Text='内科' then
begin
combobox3.Items.LoadFromFile('d:\内科主治医生.txt');
end
else if   combobox2.Text='妇产科' then
begin
combobox3.Items.LoadFromFile('d:\妇产科主治医生.txt');
end
else
begin
combobox3.Items.LoadFromFile('d:\五官科主治医生.txt');
end;
end;
我在D盘已经建了这五个txt文件,可系统总提示找不到路径

TOP

是找不到系统指定的文件,请高手指点!急!急!

TOP

问题已解决,代码没错误,我建的不是txt文件,而是dos文件,所以出错。

TOP

发新话题