It is currently September 20th, 2019, 10:38 am

Use windows .dll icons?

Help with creating, editing & fixing problems with skins
User avatar
theimmersion
Posts: 53
Joined: November 27th, 2016, 1:51 pm

Use windows .dll icons?

theimmersion » June 2nd, 2019, 12:02 pm

Can rainmeter use icons from shell32.dll etc. in image meter? I tried to google this and tried a few things but did not get any promising results, sorry if i missed it.

I'd rather not extract the icons from shell32.dll or netshell.dll etc.
User avatar
balala
Rainmeter Sage
Posts: 8626
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Use windows .dll icons?

balala » June 2nd, 2019, 12:08 pm

theimmersion wrote:
June 2nd, 2019, 12:02 pm
Can rainmeter use icons from shell32.dll etc. in image meter?
No, unfortunately it can't. The supported image formats are:
Supported image formats are .png, .jpg, .bmp, .gif (no animation supported), .tif, and .ico.
User avatar
jsmorley
Developer
Posts: 19461
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Use windows .dll icons?

jsmorley » June 2nd, 2019, 12:20 pm

No. Although you can use the FileView plugin to extract and use the icon for a file, normally a .exe or .dll executable will have icons, it will default to just the first icon in the file (in the case of a .exe) or the generic dll icon (in the case of a .dll). This won't help with icon "libraries" like shell32.dll. You are going to have to use some utility program that can extract the icon resources you want to use from these files.

https://www.nirsoft.net/utils/iconsext.html
User avatar
theimmersion
Posts: 53
Joined: November 27th, 2016, 1:51 pm

Re: Use windows .dll icons?

theimmersion » June 2nd, 2019, 1:06 pm

Awww, a shame. Oh well. :great:
Thanks for quick replies!
User avatar
StArL0rd84
Posts: 336
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Re: Use windows .dll icons?

StArL0rd84 » June 2nd, 2019, 1:46 pm

I know you'd rater not, but there are many command line programs out there, that can extract icons from system dll's but i have found that Any2Ico does it best.
Because you can tell it where to save the icon, and what name to call it.
So in your skin the Bang syntax could be something like this:
[#IconExtractResExePath# -res=imageres.dll,26 "-icon=#@#Icons\HDD.icon" -formats=32]

sysico.png
I have replaced my system icons, but you get the idea...
Would prefer a native solution, but hey, it does the job now.
You do not have the required permissions to view the files attached to this post.
(#WorkTime# = 1 ? #Work# : ([mEnergyLoss:%] > 100 ? #SleepMode# : #Rainmeter#))