>#define PICTYPE_ICON 3 >#define IID_IDispatch Chr(0x00)+Chr(0x04)+Chr(0x02)+Chr(0x00)+ ; > Replicate(Chr(0x00), 4)+Chr(0xC0)+Replicate(Chr(0x00), 6)+Chr(0x46) > >* Large icons >Declare long ExtractIconEx in shell32 String @ File, long iconIndex, ; > long @ iconLarge, long iconSmall, long nIcons >* Small icons >*Declare long ExtractIconEx in shell32 String @ File, long iconIndex, ; >* long iconLarge, long @ iconSmall, long nIcons > >Declare Long OleCreatePictureIndirect In oleaut32 ; > String @ PicDesc, String @ RefIID, Long fPictureOwnsHandle, Object @ IPic > >IconFile = "D:\Program Files\Microsoft Visual Studio\VFP98\VFP6.exe" >IconIndex = 6 >hIcon = 0 > >* Large icon >ExtractIconEx(@IconFile, IconIndex, @hIcon, 0, 1) >* SmallIcon >*ExtractIconEx(@IconFile, IconIndex, 0, @hIcon, 1) > >* Create Picture object according to PICTDESC structure >PictDesc = DWord(16) ; && Size of PICTDESC structure > + DWord(PICTYPE_ICON) ; && Type of picture > + DWord(hIcon) ; && HICON > + DWord(0) && HPALETTE >IPic = 0 >iid = IID_IDispatch >OleCreatePictureIndirect(@PictDesc, @iid, 1, @IPic) > >ImageList.ListImages.ADD(,"SomePict",IPic) >Does it mean I have to use ImageList for "GetFile" functionality?