Sign in to follow this  
Followers 0
D4rk^S0ul

Delete Gui Icon

9 posts in this topic

I was wonding if its possible to delete a gui icon that i have created earlier in the code so i can use it again, is this possible? Or will i have to hide it and use a new defination?

Share this post


Link to post
Share on other sites



$Icon = GuiCtrlCreateIcon()

GUICtrlDelete($Icon)


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I have a problem with Guictrldelete, it seems i cant recreate it, it just doesnt apear?

Edited by D4rk^S0ul

Share this post


Link to post
Share on other sites

Have a reproduction script to play with?


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Case $msg = $Button_3
        $Icon_3   = GUICtrlCreateIcon ("C:\Documents and Settings\System User\My Documents\Game\Bombs.ico",-1, $Ship, 170,32,32)
        While $Bombs > 25
            $Bombs = $Bombs - 1
            GUICtrlSetPos($Icon_3, $Ship, $Bombs)
            Sleep(10)
        WEnd
        $Bombs = 170
        GUICtrlDelete ($Icon_3)
    EndSelect

I got the delete and create working again i forgot to redefine bombs back to original, but is there any u can think of that i can press the other buttons wial this icon is still moving?

Share this post


Link to post
Share on other sites

You would have to use GUIGetMsg() / and the buttons like you did before the loop inside that loop.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Thx,

Is there a way to set 1 icon under another?

Share this post


Link to post
Share on other sites

I tryed using , $GUI_SS_DEFAULT_ICON, $WS_EX_TOPMOST on the original i want to stay ontop but it doesnt seem to work the icon after that still covers it.

Share this post


Link to post
Share on other sites

I tryed using , $GUI_SS_DEFAULT_ICON, $WS_EX_TOPMOST on the original i want to stay ontop but it doesnt seem to work the icon after that still covers it.

did you try GUICtrlSetData($icon, $GUI_DISABLE)? (For the icon before the one you want to have on top)

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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
Sign in to follow this  
Followers 0