APRES Posted October 18, 2005 Share Posted October 18, 2005 I create image with $Image1 = GUICtrlCreatePic("wv.gif", 30, 30, 35, 35) Later I'd like to change image when it is being clicked to "zs.gif", "ws.gif", .... and again to "zs.gif" But already in the first stage I get a newbie question - "How do I receive information about actual image?" Function GUICtrlRead ( controlID ) doesn't bring information about imgae. Below is code as for now: GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Image2 ChangeType($Image2) EndSelect WEnd Func ChangeType($var) $var = GUICtrlCreatePic("zs.gif", 65, 30, 35, 35) EndFunc Link to comment Share on other sites More sharing options...
Nuffilein805 Posted October 18, 2005 Share Posted October 18, 2005 how bout storing the existing picture in a variable? like this GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Image2 ChangeType($Image2) EndSelect WEnd Func ChangeType($var) if $picture <> "zs.gif" then $var = GUICtrlCreatePic("zs.gif", 65, 30, 35, 35) $picture = "zs.gif" else $var = GUICtrlCreatePic("wv.gif", 65, 30, 35, 35) $picture = "wv.gif" endif EndFunc if your script is working this should do the job (haven't tried) my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now