DELPHI 有问题,报错!~~
namelist:TStringList;procedureTForm1.Button1Click(Sender:TObject);beginlistbox1.Clear...
namelist:TStringList;
procedure TForm1.Button1Click(Sender:TObject);
begin
listbox1.Clear ;
pathstr:=pchar(edit1.text +'\*.*');
hd:=FindFirstFile(pathstr,fddata);
while(true) do
begin
if fddata.dwFileAttributes = FILE_ATTRIBUTE_DIRECTORY then
begin
Listbox1.Items.Add(string(fddata.cFileName));
namelist.Add(string(fddata.cFileName)); //<-这个有问题
end;
br:=FindNextFile(hd,fddata);
if not br then break;
end; //while end;
windows.FindClose(hd);
end;
----------------------------------------------------
能编译,但是出窗口的错误
如果回答好 给分,哈, 展开
procedure TForm1.Button1Click(Sender:TObject);
begin
listbox1.Clear ;
pathstr:=pchar(edit1.text +'\*.*');
hd:=FindFirstFile(pathstr,fddata);
while(true) do
begin
if fddata.dwFileAttributes = FILE_ATTRIBUTE_DIRECTORY then
begin
Listbox1.Items.Add(string(fddata.cFileName));
namelist.Add(string(fddata.cFileName)); //<-这个有问题
end;
br:=FindNextFile(hd,fddata);
if not br then break;
end; //while end;
windows.FindClose(hd);
end;
----------------------------------------------------
能编译,但是出窗口的错误
如果回答好 给分,哈, 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询