Jump to content
Sign in to follow this  
faustf

GUICtrlCreateIcon how is possible eliminate icon ?

Recommended Posts

faustf

hi guys , if i create a icon in  gui and i want cacel them i  can do it ???

thankz at all

 

Share this post


Link to post
Share on other sites
JLogan3o13

Why not use GUICtrlSetState to hide/unhide it when you want?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
faustf

o thankz for help i try to use it

 

Share this post


Link to post
Share on other sites
faustf

i create in this mode  the  icon

$hGiconConn = GUICtrlCreateIcon($DLL_LOCATE, -162, 780, 170)

and  i try to erase  with this

GUICtrlSetState ( $hGiconConn,$GUI_HIDE)

but not remove nothing :(

 

 

Share this post


Link to post
Share on other sites
JLogan3o13

As usual, you have been around this forum far too long to expect that anyone can solve your problem for you when you post two lines of code. This works just fine, so it is obviously something incorrect in your (unshared) code.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Local $hGUI = GUICreate("Test", 300, 200)
Local $sIcon = GUICtrlCreateIcon("shell32.dll", 10, 20, 20)
Local $btnGo = GUICtrlCreateButton("go", 10, 170, 40, 25)

GUISetState(@SW_SHOW, $hGUI)

GUISetState(@SW_SHOW)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop
            Case $btnGo
                GUICtrlSetState($sIcon, (GUICtrlGetState($sIcon) = $GUI_SHOW + $GUI_ENABLE) ? $GUI_HIDE : $GUI_SHOW)
        EndSwitch
    WEnd

 


√-1 2^3 ∑ π, and it was delicious!

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  

×