behdadsoft Posted June 13, 2018 Posted June 13, 2018 Hi. i made a dll file that contain my own large icons (100 x 20). but when i use this icon for button or any GUI, it don't show with real size. is there any way for use large icon for GUI?
AutoBert Posted June 13, 2018 Posted June 13, 2018 Please post a script and a dll where together the error occurs. Usually icons have same height and with.
Subz Posted June 13, 2018 Posted June 13, 2018 (edited) Why not embed the icon into you compiled script and associate it as required, alternatively you could also compile an image into your executable (see example below): Note requires Zednas excellent resources UDF https://www.autoitscript.com/forum/topic/51103-resources-udf/ #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=C:\Program Files (x86)\AutoIt3\Beta\Examples\Helpfile\Extras\Soccer.ico #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_Res_File_Add=C:\Program Files (x86)\AutoIt3\Examples\GUI\logo4.gif,10,idButtonImage #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GUIConstantsEx.au3> #include <Resources.au3> ;~ Created by Zedna download from https://www.autoitscript.com/forum/topic/51103-resources-udf/ Example() Func Example() Local $hGUI = GUICreate("Example", 189, 88) Local $idButton = GUICtrlCreateButton("", 10, 10, 169, 68) _ResourceSetImageToCtrl($idButton, "idButtonImage") GUISetState(@SW_SHOW, $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idButton MsgBox(4096, "Button Click", "Button Clicked") EndSwitch WEnd GUIDelete($hGUI) EndFunc ;==>Example Edited June 13, 2018 by Subz
behdadsoft Posted June 15, 2018 Author Posted June 15, 2018 (edited) Thanks Subz. but it can't compile an image into my executable. Edited June 15, 2018 by behdadsoft
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