procedure TForm1.SpeedButton2Click(Sender: TObject);
var
i,j:integer;
myicon: TSHFILEINFO;
begin
For i:=0 to (ShellListView1.Items.Count -1) do
begin
if ShellListView1.Items[i].Selected=true then
begin
for j:=0 to (ListView1.Items.Count -1) do
with ListView1.Items.Add do
begin
Caption:=ShellListView1.Folders[i].PathName;
ShGetFileInfo(pchar(ShellListView1.Selected.Caption), 0, myicon, SizeOf(TSHFileInfo),
SHGFI_SYSICONINDEX or SHGFI_SMALLICON);
ImageIndex:=myicon.iIcon;
end;
end;
end;
end;
var
i,j:integer;
myicon: TSHFILEINFO;
begin
For i:=0 to (ShellListView1.Items.Count -1) do
begin
if ShellListView1.Items[i].Selected=true then
begin
for j:=0 to (ListView1.Items.Count -1) do
with ListView1.Items.Add do
begin
Caption:=ShellListView1.Folders[i].PathName;
ShGetFileInfo(pchar(ShellListView1.Selected.Caption), 0, myicon, SizeOf(TSHFileInfo),
SHGFI_SYSICONINDEX or SHGFI_SMALLICON);
ImageIndex:=myicon.iIcon;
end;
end;
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货