Getting Icons of a folderItem 
Author Message
 Getting Icons of a folderItem



Quote:
> Hello everyone. I wonder if it's possible to intialize an RB "picture"
> variable with the icon of a given folderItem.

Dim rf as ResourceFork
Dim f as FolderItem
Dim p as Picture
f=GetFolderItem("thefile")
If f <> Nil then
rf=f.OpenResourceFork
If rf <> Nil then
p=rf.Geticl(128)
Else
MsgBox "Resource not found!"
End if
Else
MsgBox "File not found!"
End if

p is the icon.

Regards,
Adriaan Mol
http://www.*-*-*.com/



Wed, 25 Dec 2002 03:00:00 GMT  
 Getting Icons of a folderItem

Quote:



> > Hello everyone. I wonder if it's possible to intialize an RB "picture"
> > variable with the icon of a given folderItem.

> Dim rf as ResourceFork
> Dim f as FolderItem
> Dim p as Picture
> f=GetFolderItem("thefile")
> If f <> Nil then
> rf=f.OpenResourceFork
> If rf <> Nil then
> p=rf.Geticl(128)
> Else
> MsgBox "Resource not found!"
> End if
> Else
> MsgBox "File not found!"
> End if

> p is the icon.

> Regards,
> Adriaan Mol
> http://mollie.nl/

Not all files have an icon in its resource fork, for example, a simpleText
file has an icon from the simpleText application.


Wed, 25 Dec 2002 03:00:00 GMT  
 Getting Icons of a folderItem

Quote:

> Hello everyone. I wonder if it's possible to intialize an RB "picture"
> variable with the icon of a given folderItem.

There are several plugins for this on the webring.
e.g. www.tempel.org/realbasic
or micono's page.

Mfg
Christian

--
NO RISC - NO FUN! THINK DIFFERENT!
http://www.christians-software.de (Free Mac/Win software)



Wed, 25 Dec 2002 03:00:00 GMT  
 Getting Icons of a folderItem
Hmm, Well use Tool Box - Icon Services a2.? download it at www.nubz.org

Later
Adriaan Mol
http://mollie.nl/



Thu, 26 Dec 2002 03:00:00 GMT  
 Getting Icons of a folderItem

Quote:

> Hmm, Well use Tool Box - Icon Services a2.? download it at www.nubz.org

No, you should not just use them, because they are AFAIK from OS 8.5 and
newer and wouldn't work on earlier systems.
I - for me - want apps running well on 7.5.

Mfg
Christian

--
Beruehmte letzte Woerter (04):
Es ist kein Strom auf diesem Kabel.

http://www.christians-software.de (Kostenlose Mac/Win Software)



Thu, 26 Dec 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Copy/Paste a folderItem's icon

2. Setting the icon position of a folderItem, possible?

3. Getting Folderitem version

4. ICONS, ICONS, ICONS....

5. ICONS, ICONS, ICONS

6. Icons Icons Icons

7. Getting the icon associated with a file extension

8. Getting Volume or Folder Icons

9. getting the icons used in Real Basic

10. getting OSX .app icons

11. getting rid of the dock icon

12. Getting a file's associated icon

 

 
Powered by phpBB® Forum Software