Hello out there,
I hope someone can solve my problem:
I want to show the Icon of a given Document File like Word.doc or Excel.xls or somewhat ever on a command-button.
Now my question:
How can I extract this icon from the file?
Thanx for your help!
Hello Chris,
thanks for answering so fast.
This tool you've mentioned is really good, but it doesn't solve my problem. I thing this is something more complex. I must show the icon of an unknown document, i.e. during runtime I know the filename, but at creation time I can't forecast what type of documentfile the user will handle. So I have to use something like the "ExtractAssociatedIcon"-Function. But I dont know ho to handle this DLL-Function in FoxPro. Perhaps someone can help.
Thanks for all that, chris.
Is there a limited number of documents your program can handle? If so you might want to include examples of all the possible one's icons and then assign the button's icon appropriately. If you're absolutely going to *have* to collect the icon on the fly, things might get tricky. I wouldn't be at all sure that all document generating programs have specific icons. But it may be possible to collect what you need by some system .dll which assigns the icons that are assigned to file types according to extension. But I don't know which system dll it is. Probably you can either ask about it in another section here or go to the MicroSoft website and search.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.