bringing a program or files icon into rev
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
bringing a program or files icon into rev
was wondering if it is at all possible to bring a file or programs icon into rev.
For example displaying the icon of a file dragged into a rev text field.
I fully understand how to desplay a image in the text field, just not how to make that image the icon of the program or file.
Since I don't think rev can show ico files I and doubt it could look at PE resources to view icons that way, I imagine one would need to make some sort of snapshot of the icon to use it in rev.
For example displaying the icon of a file dragged into a rev text field.
I fully understand how to desplay a image in the text field, just not how to make that image the icon of the program or file.
Since I don't think rev can show ico files I and doubt it could look at PE resources to view icons that way, I imagine one would need to make some sort of snapshot of the icon to use it in rev.
Dear keyless,
I created a solution that kind of works on Mac OS X. I'm still working on it and am also trying to figure out how to do it on Windows.
Currently, I find the icns file in an OSX application package, convert it to a different format, and import that into Rev.
Best,
Mark
I created a solution that kind of works on Mac OS X. I'm still working on it and am also trying to figure out how to do it on Windows.
Currently, I find the icns file in an OSX application package, convert it to a different format, and import that into Rev.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
That's not really the problem I see, there are plenty of free command line ICO to PNG or whatever exe's, + most single ICO's are really just bmp's. The real problem in this is getting at the ICO as most are stored as resources in EXE's or DLL's.Garrett wrote:Rev can't display the ico image format.
I'm going to look into resource access with VB script. Found something called AutoIt that might help (amongst other amazing things it might be able to do with a Rev Wrapper).
snapshot method would only work from icon view, not from a detailed or list view.
Well, yeah, that is kind of your problem.. You asked if there was a way to display an icon from another program in Rev. And the problem is, Rev can't display ico files at all. I was merely pointing out that Rev isn't capable of displaying ico files.
You didn't ask about command line programs or external programs.
I will mention one more thing though... I'm pretty sure it's possible with Rev to find if an exe has an icon, and likely extract it. From there you'd just need to convert it to a format that Rev can display. I used to do this in another language, but it's been so long now, I can't remember the specifics of how to do so
You didn't ask about command line programs or external programs.
I will mention one more thing though... I'm pretty sure it's possible with Rev to find if an exe has an icon, and likely extract it. From there you'd just need to convert it to a format that Rev can display. I used to do this in another language, but it's been so long now, I can't remember the specifics of how to do so

This is the key, would love to see some code for this. I'm still hunting around and will post back if I find anything. Not finding much, as this is so built into Visual Studio based languages (or any language with Shell32.dll access), doesn't seem to be much on it.I'm pretty sure it's possible with Rev to find if an exe has an icon, and likely extract it.
I'm not as optomistic and have serious doubts Rev can natively look at PE resources in DLLs or EXEs
The ICO to, lets say PNG, is trivial. As I said there are a lot of good command line converters, Imagemagick for one (but simpler and smaller ico2pngs are better suited)
Last edited by keyless on Mon Aug 04, 2008 7:14 am, edited 1 time in total.
I found this that might be helpful.
http://www.vbaccelerator.com/codelib/shell/shelicon.htm
I've also found that the iconlocation property for VB scirpt can give icon locations for shortcuts.
I have seen VBScripts (which like REV, have no Windows API access) that can get icons from files, so I am now thinking maybe it can be done if the PE structure can be found in the binary.
http://www.vbaccelerator.com/codelib/shell/shelicon.htm
I've also found that the iconlocation property for VB scirpt can give icon locations for shortcuts.
I have seen VBScripts (which like REV, have no Windows API access) that can get icons from files, so I am now thinking maybe it can be done if the PE structure can be found in the binary.
SparkOut wrote:This might be a good place to look
http://www.jsware.net/jsware/scripts.php5#iconextr
Yes, I found that too. Looks promissing.

I'm finding that the best option for this would be a external made to call the SHGetFileInfo API. I am seeing a lot of VB code for this.keyless wrote:SparkOut wrote:This might be a good place to look
http://www.jsware.net/jsware/scripts.php5#iconextr
Yes, I found that too. Looks promissing.