Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extract associated icon from a document-file

Status
Not open for further replies.

georg59

Programmer
Sep 1, 2001
26
DE
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.

Georg
 
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.

Dave Dardinger
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top