Hi does anyone know I can display the icon of a file that has been associated with that file in the native OS.
I have a tile list of a folder's contents. For images, I display the image, for everything else I display a generic image. However, it would be great if I could tap into the OS and just use the icon that the OS uses. For example, if I have installed Microsoft Word on my computer, then when I view a word document in the file system it will display the word icon that Microsoft created for word documents. For MP3's it might be an iTunes type sound icon, if I have iTunes installed and so on.
Basically, for all the files in my tile list I want to just show the same icon that Windows, or Mac OS would etc.
In additi开发者_Go百科on to this, if the OS creates a thumbnail for the file (images, videos and PDFs for example) is it possible to tap into this OS generated thumb?
Cheers,
Craig
You can write OS-dependent tools that will grab native icons (EXE for Win, DMG for Mac, etc.) and package them with your application into a native installer.
After this you will be able to call those native tools from you AIR app.
I was also searching for the same question and i came upon this Displaying native icons in AIR. In that link, there is sample code for rendering native system icons.
Hope this will be useful.
精彩评论