【delphi】请问在delphi中,如何把某文件夹下的文件读取到PopupMenu上 或者说 如何用PopupMenu遍历文件

[复制链接]
查看11 | 回复1 | 2012-8-23 09:19:00 | 显示全部楼层 |阅读模式
给个例子给你: procedure TForm1.FormCreate(Sender: TObject);constext='.TXT';varsr: TSearchRec;eh: Integer;pt: String;mn: TMenuItem;begin
pt := ExtractFilePath(Application.ExeName);
if pt[Length(pt)]'\' then pt := pt + '\';
eh := FindFirst(pt + '*.*', faAnyFile, sr);
while eh = 0 do ...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行