Jump to content
Sign in to follow this  
D4rk^S0ul

Delete Gui Icon

Recommended Posts

D4rk^S0ul

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
SmOke_N

$Icon = GuiCtrlCreateIcon()

GUICtrlDelete($Icon)


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.

Share this post


Link to post
Share on other sites
D4rk^S0ul

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
SmOke_N

Have a reproduction script to play with?


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.

Share this post


Link to post
Share on other sites
D4rk^S0ul

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
SmOke_N

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


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.

Share this post


Link to post
Share on other sites
D4rk^S0ul

Thx,

Is there a way to set 1 icon under another?

Share this post


Link to post
Share on other sites
D4rk^S0ul

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
SmOke_N

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)

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.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.