On 31-Dec-08, at 9:50 AM, Lennox Jacob wrote:
Thanks Thom,
I did this:
'This example gets the desktop application icon for Photoshop® and
displays it in a Canvas control.
#if TargetMacOS then
Dim rf as ResourceFork
Dim f as FolderItem
Dim p as Picture
'f= GetFolderItem("Photoshop") I don't have Photoshop, but I have
Safari
f=
SpecialFolder
.Applications
.child
("Safari
.app").child("Contents").child("Resources").Child("compass.icns")
f.launch 'This launches Preview and displays the compass as a
picture
How could I get the Compass displayed as a picture in Canvas1?
You should use a "well documented API" to get the icon instead of
reading it directly from the icns file like this
Apple provides API's for this
Charles Yeomans MacOSLIb (see http://code.google.com/p/macoslib/) has
that implemented and can grab an icon as a picture from a fodler item
And there's an example of this in there as well
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|