Jump to content

Issue with GUICtrlSetImage from an exe file


jpd
 Share

Recommended Posts

With AutoIt 3.2.6.0, GUICtrlSetImage (-1, "progman.exe",33) doesn't work. It was working with previous version.

I've tested with different icons of progman.exe ; it still works from GUICtrlSetImage (-1, "progman.exe",0) to GUICtrlSetImage (-1, "progman.exe",11). I've also tested with taskmgr.exe ; the issue is still there.

#include <

GUIConstants.au3>

GUICreate("My GUI") ; will create a dialog box that when displayed is centered

GUICtrlCreateButton ("my picture button", 10,20,40,40, $BS_ICON)

;GUICtrlSetImage (-1, "shell32.dll",22)

GUICtrlSetImage (-1, "progman.exe",33)

GUISetState ()

; Run the GUI until the dialog is closed

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Wend
Thanks for your help.
Link to comment
Share on other sites

Look here

 and here

it was changed:

Passing a positive number will reference the string equivalent icon name.

Passing a negative number causes 1-based "index" behaviour. Some Dll can have icon extracted just with negative numbers.

EDIT:

instead

GUICtrlSetImage (-1, "progman.exe",33)

try

GUICtrlSetImage (-1, "progman.exe",-34)
Edited by Zedna
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...