If r = 32 Then
'размер иконки 32 или 16
ExtractIconEx Path_F, IconNUmber, hIcon, 0, 1
Else
ExtractIconEx Path_F, IconNUmber, 0, hIcon, 1
End If
Set Pic = IconToPicture(hIcon)
Public Function IconToPicture(ByVal hIcon As Long) As IPicture
Dim iPic As IPicture, picDes As PictDesc, iidIPicture As Guid
With picDes
.cbSizeofStruct = Len(picDes)
.picType = &H3
.hImage = hIcon
End With
With iidIPicture
.Data1 = &H7BF80980
.Data2 = &HBF32
.Data3 = &H101A
.Data4(0) = &H8B
.Data4(1) = &HBB
.Data4(2) = &H0
.Data4(3) = &HAA
.Data4(4) = &H0
.Data4(5) = &H30
.Data4(6) = &HC
.Data4(7) = &HAB
End With
Call OleCreatePictureIndirect(picDes, iidIPicture, True, IconToPicture)
End Function
Imagelist1.Listimages.Add ,"Ключ иконки",Pic
Сейчас этот форум просматривают: Google-бот и гости: 12