Jump to content
Sign in to follow this  
Rad

Get icon from an EXE

Recommended Posts

Rad

I thought it was simple, but I can't figure it out. Unfortunately the search results are either irrelevant or they are "How to make custom script icon".

The example uses a .dll, but simply trying an EXE doesn't seem to work. Is there something I'm missing?

GUICtrlCreateButton($files[$i][0], $x, $y, $form_icosz, $form_icosz, $BS_ICON)

GUICtrlSetImage(-1, "C:\Program Files\App\App.exe")

The same format above works when I specify an .ico file.

Edit: was using the wrong array index... It was actually $files[$i][2]

I should have waited to post :/

Also, I had to add a third parameter "1" to GUICtrlSetImage.

...Wish I could remove this post.

Edited by Rad

Share this post


Link to post
Share on other sites
Intosia

Its the funtion "ExtractIconA" in shell32.dll. Try looking at DllCall functionin Autoit. Never dont this myself though...

Share this post


Link to post
Share on other sites
Andreik

Look here.


When the words fail... music speaks

Share this post


Link to post
Share on other sites
dbzfanatic

I thought it was simple, but I can't figure it out. Unfortunately the search results are either irrelevant or they are "How to make custom script icon".

The example uses a .dll, but simply trying an EXE doesn't seem to work. Is there something I'm missing?

GUICtrlCreateButton($files[$i][0], $x, $y, $form_icosz, $form_icosz, $BS_ICON)

GUICtrlSetImage(-1, "C:\Program Files\App\App.exe")

The same format above works when I specify an .ico file.

Edit: was using the wrong array index... It was actually $files[$i][2]

I should have waited to post :/

Also, I had to add a third parameter "1" to GUICtrlSetImage.

...Wish I could remove this post.

Since you figured it out please add "[sOLVED]" to your title (without quotes) so others know you no longer have a problem.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×