Jump to content
behdadsoft

use large icon

Recommended Posts

behdadsoft

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?

Share this post


Link to post
Share on other sites
AutoBert

Please post a script and a dll where together the error occurs. Usually icons have same height and with.

Share this post


Link to post
Share on other sites
Subz
Posted (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 by Subz

Share this post


Link to post
Share on other sites
behdadsoft
Posted (edited)

Thanks Subz.

but it can't compile an image into my executable.

Edited by behdadsoft

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

×