如何解决找不到系统的指定路径问题

wuminfang 2005-05-17 06:42:38
在使用opendialog的时候提示了找不到系统的指定路径,请问如何解决啊!
具体的源代码

procedure setfilename(const filename:string);
//设置文件名
var ffilename : string;
begin
ffilename := filename;
mainform.Caption := format('%s-%s',[extractfilename(filename),application.Title]);
end;
procedure checkfilesave;
//显示一个提醒存盘的消息框,并根据用户的反馈执行相应的动作
var
saver:integer;
begin
if not mainform.RichEdit1.Modified then
exit;
saver := messagedlg(format('将修改的文件存入文件%s?',[ffilename]),mtconfirmation,mbyesnocancel,0);
case saver of
idyes : mainform.RichEdit1.Lines.SaveToFile(ffilename);
idno: ;
idcancel : abort;
end;
end;
procedure TMainform.N7Click(Sender: TObject);
//文件的打开功能;
begin
checkfilesave;
if opendialog1.Execute then
begin
performfileopen(opendialog1.FileName);
mainform.RichEdit1.ReadOnly := ofreadonly in opendialog1.Options;
end;
end;
请问我该如何改进呢?
谢谢了,
...全文
277 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
wuminfang 2005-05-20
  • 打赏
  • 举报
回复
我已经解决了问题,多谢了
CentaurCao 2005-05-19
  • 打赏
  • 举报
回复
performfileopen这个是自己编写的吧?
这里面可能有问题。
估计是这里处理opendialog传进去的参数有问题。
Gfire 2005-05-18
  • 打赏
  • 举报
回复
单步调试就知道哪句出错了啊,反正没几句
duanhai 2005-05-18
  • 打赏
  • 举报
回复
不知是哪一句出了錯?
ly_liuyang 2005-05-18
  • 打赏
  • 举报
回复
OpenDialog的Options指定文件,目录必须存在的参数
自己看Help,什么都有的

http://lysoft.7u7.net

16,749

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 语言基础/算法/系统设计
社区管理员
  • 语言基础/算法/系统设计社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧