sensalim Posted November 1, 2007 Posted November 1, 2007 My GUI has few button-images and I have to copy these .bmp files along with the .exe (compiled) to show the images. I've seen there are dll files that contain just icons... how do I do that? Thank you!
rasim Posted November 2, 2007 Posted November 2, 2007 GUICtrlCreateButton("", 10, 230, 90, 25, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", -138, 0)oÝ÷ Ù:âë-¯(jëh×6FileInstall("c:\pict.bmp", @TempDir & "\pict.bmp")oÝ÷ Ùû§rب©Ýr§ç(uëazf®¶sduT7G&Ä7&VFT'WGFöâgV÷C²gV÷C²ÂÂ#3ÂÂ#RÂb33c´%5ô$DÔ¤uT7G&Å6WDÖvRÓÂFV×F"fײgV÷C²b3#·7Bæ&×gV÷C²
martin Posted November 2, 2007 Posted November 2, 2007 (edited) My GUI has few button-images and I have to copy these .bmp files along with the .exe (compiled) to show the images.I've seen there are dll files that contain just icons... how do I do that?Thank you!Start reshacker. (Usually in Program Files\Autoit3\Scite\AutoIt3Wrapper)menu option File|OpenOpen an existing icon.dll, preferably with as few icons as possible.Open the Icon Group folder, then open the folder for an icon name, click on the icon symbol and delete it. Do this for all the icons. The panel will then be blank without even the Icon folder but it doesn't matter. Choose Action|Add Resource and select your icon, add a name for it but don't worry about the language.Keep adding icons then Save or save As.I haven't tried it with bmp's but Zedna has a method to add resources to a compiled exe in example scripts which works for bitmaps.Zedna's method.Edited 11th Nov 2007 because the description I gave to use Reshacker was incorrect. Edited November 11, 2007 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Emiel Wieldraaijer Posted November 2, 2007 Posted November 2, 2007 Use the latest Scite with the latest wrapper and place resource hacker in the AutoIT3Wrapper folder add something like this in your top #AutoIt3Wrapper_Res_Icon_Add=c:\icon\icon1.ico #AutoIt3Wrapper_Res_Icon_Add=c:\icon\icon2.ico #AutoIt3Wrapper_Res_Icon_Add=c:\icon\icon3.ico #AutoIt3Wrapper_Res_Icon_Add=c:\icon\icon4.ico for example TraySetIcon(@ScriptName, -5) when you compile your script the is a tab in the wrapper called Res Add Files .. these files are the same as the #AutoIt3Wrapper_Res_Icon_Add mentioned above Good Luckl Best regards,Emiel Wieldraaijer
sensalim Posted November 2, 2007 Author Posted November 2, 2007 I installed the latest SciTE. It has AutoIt3Wrapper directory but no reshacker.exe... Doing a search on my system for that file right now...
Achilles Posted November 2, 2007 Posted November 2, 2007 I installed the latest SciTE. It has AutoIt3Wrapper directory but no reshacker.exe...Doing a search on my system for that file right now...You need to download that separately... I'm pretty sure it doesn't come with AutoIt My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Zedna Posted November 2, 2007 Posted November 2, 2007 You can find it by Google.Here is the link Resources UDF ResourcesEx UDF AutoIt Forum Search
sensalim Posted November 2, 2007 Author Posted November 2, 2007 Yea found it, didn't know it does not come with SciTE. Thanks.
Emiel Wieldraaijer Posted November 6, 2007 Posted November 6, 2007 I've found a little tool which can make an icon dll it can import the icons from a dll and can export them to a dll http://www.all4you.dk/FreewareWorld/IconJack32-28000.htmlThe program is called IconJack32 Best regards,Emiel Wieldraaijer
Madza91 Posted November 6, 2007 Posted November 6, 2007 I am installed that IconJack32 and maked dll with 3 icons but only first works :S why??? #include <GuiConstants.au3> GuiCreate("MyGUI", 392, 316,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $ico1 = GUICtrlCreateIcon ("1.ico", 0,0,1,32,32) GUICtrlSetImage (-1, "icon.dll",0) $ico1 = GUICtrlCreateIcon ("1.ico", 0,32,1,32,32) GUICtrlSetImage (-1, "icon.dll",1) $ico1 = GUICtrlCreateIcon ("1.ico", 0,64,1,32,32) GUICtrlSetImage (-1, "icon.dll",2) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit icon.dll icon.dll [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)
martin Posted November 6, 2007 Posted November 6, 2007 I am installed that IconJack32 and maked dll with 3 icons but only first works :S why??? #include <GuiConstants.au3> GuiCreate("MyGUI", 392, 316,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $ico1 = GUICtrlCreateIcon ("1.ico", 0,0,1,32,32) GUICtrlSetImage (-1, "icon.dll",0) $ico1 = GUICtrlCreateIcon ("1.ico", 0,32,1,32,32) GUICtrlSetImage (-1, "icon.dll",1) $ico1 = GUICtrlCreateIcon ("1.ico", 0,64,1,32,32) GUICtrlSetImage (-1, "icon.dll",2) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit icon.dll icon.dll Reshacker says that your icon.dll is not a valid dll. Try using reshacker to make dll as described in my earlier post. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
ashley Posted November 6, 2007 Posted November 6, 2007 or go to the link in my sig that says: help make icon pack 'Rock' and submit the image and ill add it into the Icon pack(next verison) Free icons for your programs
Madza91 Posted November 7, 2007 Posted November 7, 2007 (edited) Ok, i wanted .dll but it doesn't matter, .icl is ok. I found ICL Builder and it can make .icl format Edited November 7, 2007 by n3nE [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)
Zedna Posted November 7, 2007 Posted November 7, 2007 (edited) I am installed that IconJack32 and maked dll with 3 icons but only first works :S why??? #include <GuiConstants.au3> GuiCreate("MyGUI", 392, 316,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $ico1 = GUICtrlCreateIcon ("1.ico", 0,0,1,32,32) GUICtrlSetImage (-1, "icon.dll",0) $ico1 = GUICtrlCreateIcon ("1.ico", 0,32,1,32,32) GUICtrlSetImage (-1, "icon.dll",1) $ico1 = GUICtrlCreateIcon ("1.ico", 0,64,1,32,32) GUICtrlSetImage (-1, "icon.dll",2) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit icon.dll icon.dll IconId musst be negative 1-based index when referencing by index (and not name) This works fine: #include <GuiConstants.au3> GuiCreate("MyGUI", 392, 316,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $ico1 = GUICtrlCreateIcon ("icon.dll", -1,0,1,32,32) ;~ GUICtrlSetImage (-1, "icon.dll",-1) $ico2 = GUICtrlCreateIcon ("icon.dll", -2,32,1,32,32) ;~ GUICtrlSetImage (-1, "icon.dll",-2) $ico3 = GUICtrlCreateIcon ("icon.dll", -3,64,1,32,32) ;~ GUICtrlSetImage (-1, "icon.dll",-3) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit EDIT: Use simple #AutoIt3Wrapper_Res_Icon_Add= directive Edited November 7, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
Madza91 Posted November 7, 2007 Posted November 7, 2007 Yea that is useful but i dont know how to use that icon? [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)
Zedna Posted November 7, 2007 Posted November 7, 2007 (edited) Yea that is useful but i dont know how to use that icon?Answer is to use @ScriptFullPath instead of DLL/icon filename.Look here and look at example at bottom of page. Edited November 7, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
Madza91 Posted November 7, 2007 Posted November 7, 2007 (edited) Not work for me,this: #Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Res_Icon_Add=D:\Program Files\AutoIt3\Icons\au3.ico #AutoIt3Wrapper_Res_Icon_Add=D:\Program Files\AutoIt3\Icons\filetype1.ico #AutoIt3Wrapper_Res_Icon_Add=D:\Program Files\AutoIt3\Icons\filetype2.ico #AutoIt3Wrapper_Res_Icon_Add=D:\Program Files\AutoIt3\Icons\filetype3.ico #AutoIt3Wrapper_Res_Icon_Add=D:\Program Files\AutoIt3\Icons\filetype-blank.ico #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** #include <GUIConstants.au3> GUICreate("Demo resource ICO's") $h_Button1 = GUICtrlCreateButton("my picture button", 10, 20, 40, 40, $BS_ICON) GUISetState() For $x = 0 To 7 $rc = TraySetIcon(@ScriptFullPath, $x) $rc2 = GUICtrlSetImage($h_Button1, @ScriptFullPath, 6) If $x < 3 Then TrayTip("Default ico:" & $x, "TraySetIcon rc:" & $rc & @LF & "GUICtrlSetImage rc:" & $rc2, 3) Else TrayTip("New ico:" & $x, "TraySetIcon rc:" & $rc & @LF & "GUICtrlSetImage rc:" & $rc2, 3) EndIf Sleep(2000) Next GUIDelete() WHY ? I open that compiled exe and open with reshacker and icons is there- in that exe file, but if run exe not work ... Edited November 7, 2007 by n3nE [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)
Zedna Posted November 7, 2007 Posted November 7, 2007 Not work for me,this: #Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Res_Icon_Add=D:\Program Files\AutoIt3\Icons\au3.ico #AutoIt3Wrapper_Res_Icon_Add=D:\Program Files\AutoIt3\Icons\filetype1.ico #AutoIt3Wrapper_Res_Icon_Add=D:\Program Files\AutoIt3\Icons\filetype2.ico #AutoIt3Wrapper_Res_Icon_Add=D:\Program Files\AutoIt3\Icons\filetype3.ico #AutoIt3Wrapper_Res_Icon_Add=D:\Program Files\AutoIt3\Icons\filetype-blank.ico #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** #include <GUIConstants.au3> GUICreate("Demo resource ICO's") $h_Button1 = GUICtrlCreateButton("my picture button", 10, 20, 40, 40, $BS_ICON) GUISetState() For $x = 0 To 7 $rc = TraySetIcon(@ScriptFullPath, $x) $rc2 = GUICtrlSetImage($h_Button1, @ScriptFullPath, 6) If $x < 3 Then TrayTip("Default ico:" & $x, "TraySetIcon rc:" & $rc & @LF & "GUICtrlSetImage rc:" & $rc2, 3) Else TrayTip("New ico:" & $x, "TraySetIcon rc:" & $rc & @LF & "GUICtrlSetImage rc:" & $rc2, 3) EndIf Sleep(2000) Next GUIDelete() WHY ? I open that compiled exe and open with reshacker and icons is there- in that exe file, but if run exe not work ... You must use negative 1-based index as I said before. This example is for very old AutoIt version, now it's changed. See remarks in AutoIt helpfile for GUICtrlSetImage: 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. Resources UDF ResourcesEx UDF AutoIt Forum Search
Madza91 Posted November 7, 2007 Posted November 7, 2007 I am stupid for english, i something understand something not and because i asking for every stupid thing [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)
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