如题。请指教。一定给分!
解决方案 »
- 数字格式问题(100分)
- Delphi动态链接库编程
- 想删除数据库中某条记录blob字段里的图片,怎么编程?
- procedure WMMouseDOWN(var message:TWMLBUTTONDOWN); message WM_LBUTTONDOWN;
- 是检测数据字段的类型、长度的问题
- vb 用dbgrid显示记录的一点小问题
- 江湖救急,一个关于调用DLL的问题???????
- 在线等待,关于帮助文件的问题,急!
- 改造现有的事件?
- 谁有coreide.dcp文件?安装了delphi6的朋友搜一下你的硬盘,谢谢了
- 用ShellExecute启动一个程序,怎样等它执行结束?(在线给分)
- 如何用installshield的制作安装中注册一个组件。
var
icon : TIcon;
filename : string;
i,j : integer;
begin
icon := TIcon.Create;
i := strToInt(intToStr(extractIcon(hInstance,pchar(filename),DWord(-1 )));
for j:=0 to i-1 do
begin
icon.Handle := extractIcon(hInstance,pchar(filename),j);
imageList1.AddIcon(icon);
inc(i);
end;
icon.Free;
end;
procedure TForm1.FileListBox1Click(Sender: TObject);
var
icon : TIcon;
filename : string;
i,j : integer;
listItem : TListItem;
begin
filename := fileListBox1.FileName;
icon := TIcon.Create;
i := strToInt(intToStr(extractIcon(hInstance,pchar(filename),DWord(-1))));
for j:=0 to i-1 do
begin
icon.Handle := extractIcon(hInstance,pchar(filename),j);
listItem := listView1.Items.Add;
listItem.ImageIndex := imageList1.AddIcon(icon);
inc(i);
end;
icon.Free;
end;