Jump to content

buttons with custom icons


oneLess
 Share

Recommended Posts

$iconpath = "d:\blablabla\"

$icon1 = "x.ico"

$icon2 = "exit2.ico"

$icon3 = "8096.ICO"

GuiCtrlCreateIcon($iconpath & $icon1,-1, 19, 19)

$ExitID = GUICtrlCreateButton( "Iesire" , 55, 55, 60, 60, $BS_ICON)

GUICtrlSetImage ($ExitID, $iconpath & $icon2) ;

$ShutID = GUICtrlCreateButton( "Shutdown" , 99, 99, 31, 31, $BS_ICON) ;33,33

GUICtrlSetImage ($ShutID, $iconpath & $icon3) ;

running .au3 or . exe i can see my icons on GUI till i move the 3 icons in other folder.

then i dont see on my gui the icons .

if i include with

fileinstall("d:\blablabla\x.ico" , "")

fileinstall("d:\blablabla\exit2.ico" , "")

fileinstall("d:\blablabla\8096.ICO" , "")

then (i run the .au3 from desktop) i get the 3 icons on my desktop .

how can i include in my .exe the 3 icons without copy them from exe file somewhere ?

i use already another icon for the .exe file .

Link to comment
Share on other sites

running .au3 or . exe i can see my icons on GUI till i move the 3 icons in other folder.

then i dont see on my gui the icons .

if i include with

then (i run the .au3 from desktop) i get the 3 icons on my desktop .

how can i include in my .exe the 3 icons without copy them from exe file somewhere ?

i use already another icon for the .exe file .

You HAVE to extract the pictures somewere in order to use them, a proper place would be the Temp folder:

msgbox(0,"",@TempDir)

Then on exit, delete the files again

$ButtonPic = @Tempdir & "\Pic.jpg"

Filedelete($ButtonPic)

Link to comment
Share on other sites

ok . i figure out with this .

but seems to have another problem .

the .au3 file work ok with temp. folder , but the compiled .exe

do not want to extract the 3 icons to temp folder !?

probably i made some wrong here ?

i use

fileinstall("D:\x.ico" , @TempDir, 1)

so , normally x.ico must to be

included already in my .exe file !?

/EDIT

work with

fileinstall("D:\x.ico" , @TempDir & "\", 1)

Edited by oneLess
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...