jpd Posted August 29, 2007 Posted August 29, 2007 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.
Zedna Posted August 29, 2007 Posted August 29, 2007 (edited) 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 August 29, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
jpd Posted August 29, 2007 Author Posted August 29, 2007 Thanks it works fine !I had read help but I hadn't understood what 1-based "index" means.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now