maxrealqnx Posted December 3, 2011 Share Posted December 3, 2011 (edited) If have two windows, how can I change picture of the first window without delete the second window ? Thank you in advance for your answers. Best regards #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 500, 500, 302, 218) $Pic1 = GUICtrlCreatePic("C:\Program Files\AutoIt3\Examples\ExtrasAutoIt.bmp", 0, 0, 0, 0, $SS_BITMAP) GUISetState(@SW_SHOW, $Form1) $Form2 = GUICreate("Form2", 500, 500, 302, 218) $Pic2 = GUICtrlCreatePic("C:\Program Files\AutoIt3\Examples\ExtrasLogo.bmp", 0, 0, 0, 0, $SS_BITMAP) WinSetOnTop("Form2", "", 1) GUISetState(@SW_SHOW, $Form2) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE ;GUISetState($Form2, @SW_DISABLE) ;WinSetOnTop("Form2", "", 0) GUICtrlDelete ($Pic1) $Pic1 = GUICtrlCreatePic("C:\Program Files\AutoIt3\Examples\ExtrasTech.bmp", 0, 0, 0, 0, $SS_BITMAP) MsgBox (0, "", "Form1 picture changed :)") Exit EndSwitch WEnd Edited December 3, 2011 by maxrealqnx Visit My Website Link to comment Share on other sites More sharing options...
Roshith Posted December 3, 2011 Share Posted December 3, 2011 Insert GUISwitch($Form1) after GUICtrlDelete ($Pic1) maxrealqnx 1 Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted December 3, 2011 Share Posted December 3, 2011 Or use GUICtrlSetImage() maxrealqnx 1 .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
maxrealqnx Posted December 3, 2011 Author Share Posted December 3, 2011 Insert GUISwitch($Form1) after GUICtrlDelete ($Pic1)Thank you very much for your quick reply. God bless you. Best regards Visit My Website 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