var sr: TSearchRec; FileAttrs,taglength: Integer; begin combobox1.Items.Clear; FileAttrs:=faArchive; if findfirst('C:\',faAnyFile,sr)=0 then begin if (sr.Attr and FileAttrs) = sr.Attr then combobox1.Items.Add(copy(sr.name,1,length(sr.name)); while FindNext(sr) = 0 do if (sr.Attr and FileAttrs) = sr.Attr then combobox1.Items.Add(copy(sr.name,1,length(sr.name))); sysutils.FindClose(sr); end;
错了: var sr: TSearchRec; FileAttrs,taglength: Integer; begin combobox1.Items.Clear; FileAttrs:=faArchive; if findfirst('C:\*.chm',faAnyFile,sr)=0 then begin if (sr.Attr and FileAttrs) = sr.Attr then combobox1.Items.Add(copy(sr.name,1,length(sr.name)); while FindNext(sr) = 0 do if (sr.Attr and FileAttrs) = sr.Attr then combobox1.Items.Add(copy(sr.name,1,length(sr.name))); sysutils.FindClose(sr); end;
sr: TSearchRec;
FileAttrs,taglength: Integer;
begin
combobox1.Items.Clear;
FileAttrs:=faArchive;
if findfirst('C:\',faAnyFile,sr)=0 then
begin
if (sr.Attr and FileAttrs) = sr.Attr then
combobox1.Items.Add(copy(sr.name,1,length(sr.name));
while FindNext(sr) = 0 do
if (sr.Attr and FileAttrs) = sr.Attr then
combobox1.Items.Add(copy(sr.name,1,length(sr.name)));
sysutils.FindClose(sr);
end;
var
sr: TSearchRec;
FileAttrs,taglength: Integer;
begin
combobox1.Items.Clear;
FileAttrs:=faArchive;
if findfirst('C:\*.chm',faAnyFile,sr)=0 then
begin
if (sr.Attr and FileAttrs) = sr.Attr then
combobox1.Items.Add(copy(sr.name,1,length(sr.name));
while FindNext(sr) = 0 do
if (sr.Attr and FileAttrs) = sr.Attr then
combobox1.Items.Add(copy(sr.name,1,length(sr.name)));
sysutils.FindClose(sr);
end;
*.htm--->一个.chm
一个.chm --->--> *.htm,*jpg,....这个列表
不过好像有CHM-->HTML的工具.
耶書制造 CHMmaker
编辑/编译CHM文件、反编译CHM/HLP文件到源文件、HLP帮助工程转换为HHP帮助工程。
http://elsesoft.home.sohu.com
http://else.go.163.com