Retrieve default system icon based on file extension

ssteinke

for what it's worth
Local time
Yesterday, 21:06
Joined
Aug 2, 2003
Messages
195
I am trying to develope a document management system in Access. One thing I would like to do in my ActiveX Listview is show the default icon associated in Windows with that specific file extension (e.g. show the Excel icon when my file has an xls-extension as Windows Explorer does).

I found some VB-code to extract the default icon from the Windows Registry (http://www.developerfusion.co.uk/show/2982/) and assign it to a PictureBox. So, this basically does what I want, except for the fact that I cannot do this in VBA since it uses a PictureBox's hDC. VBA does not have a PictureBox and the closest control being an Image Control has no hDC.

I have also done some research on this topic in the VB forums, but this issue never seems to be answered.

I've been playing with this for some time, has anybody ever tried to do the same or know how to tackle this? :eek:

Scott
 

Users who are viewing this thread

Back
Top Bottom