Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieval of icons associated with files/applications
Message
 
To
14/08/2001 09:37:24
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00542621
Message ID:
00543477
Views:
23
>>It represents a zero based offset of the icon in the actual executable. An executable or dynamic link library can contain multiple icons. This little code snippet, demonstrates how to find out how many icons are in a particular EXE or DLL
DECLARE INTEGER ExtractIcon IN Shell32;
>>  INTEGER hInst, STRING @lpszExeFileName,;
>>  INTEGER nIconIndex
>>lcfile = "C:\Program Files\Microsoft Office\Office\Winword.exe"
>>? ExtractIcon(0, @lcfile, -1)
>
>George,
>
>Very cool. I understand a bit more of this stuff each time I ask you something... Thanks!
>
Renoir,

Sure thing. BTW, you can (although it's not very stable in VFP) actually display these icons on a VFP form. It's a bit tough, but you could, for example, use the technique to create an About... dialog that you could use with any application. In fact, I've done just that.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform