ddeerr Posted August 2, 2006 Share Posted August 2, 2006 Hi, I have a strange problem, i cannot set a background image without having button which appeared behind it. I saw oher post which said use gui_disable but it doesn't work 4 me. any idea please. Local $fenetrePrincipale, $imageFond Global $inputValAchercher, $bouttonRecherche, $bouttonExit FileInstall("C:\_DSA_\autoIt\2.jpg", "C:\_DSA_\autoIt\regcheck.au3") ; création de la fenêtre principale $fenetrePrincipale = GUICreate(".RegChecK Papa.", 245, 130, 350, 350, $WS_CAPTION + $WS_SYSMENU + $WS_VISIBLE, $WS_EX_CONTEXTHELP + $WS_EX_STATICEDGE) If $fenetrePrincipale <> 0 Then $inputValAchercher = GUICtrlCreateInput("", 20, 20, 200, 22) $bouttonRecherche = GUICtrlCreateButton("Chercher", 20, 50, 200, 25) $bouttonExit = GUICtrlCreateButton("Sortir", 20, 85, 200, 25) ;GUICtrlSetStyle($bouttonExit, $DS_SETFOREGROUND) $imageFond = GUICtrlCreatePic("C:\_DSA_\autoIt\2.jpg", 0, 0, 399, 129) GUICtrlSetState($imageFond, $GUI_DISABLE) ; affichage de la fenêtre GUISetState(@SW_SHOW) etc... Link to comment Share on other sites More sharing options...
eynstyne Posted August 2, 2006 Share Posted August 2, 2006 Try putting the picture control before the button. Also do this... $pic = Guictrlcreatepic("C:\picture.bmp",left,top,length,width, 0) <-- Add 0 so that the picture is behind the button and the button control is in front $button = Guictrlcreatebutton("Ok",left,top,length,width, -1)<---Add -1 so that the button is on top of the picture F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent] Link to comment Share on other sites More sharing options...
ddeerr Posted August 2, 2006 Author Share Posted August 2, 2006 Try putting the picture control before the button. Also do this...$pic = Guictrlcreatepic("C:\picture.bmp",left,top,length,width, 0) <-- Add 0 so that the picture is behind the button and the button control is in front$button = Guictrlcreatebutton("Ok",left,top,length,width, -1)<---Add -1 so that the button is on top of the picturetx its work with that.maybe you can help before i try to find something, well i try to add an image to the final exe file which i will use on several system, is it possible ? Link to comment Share on other sites More sharing options...
Briegel Posted August 2, 2006 Share Posted August 2, 2006 I think this is the reason for using FileInstall(). Link to comment Share on other sites More sharing options...
ddeerr Posted August 2, 2006 Author Share Posted August 2, 2006 I think this is the reason for using FileInstall(). YES BUT IT WASN'T WORK UNTIL I FIND THIS POST : http://www.autoitscript.com/forum/index.ph...26039&st=15 So now its like that : $imageFond = _TempFile() MsgBox(4096, "Name suitable for new temporary file", $imageFond) FileInstall("C:\_DSA_\autoIt\2.jpg",$imageFond) ; création de la fenêtre principale $fenetrePrincipale = GUICreate(".RegChecK Papa.", 245, 130, 350, 350, $WS_CAPTION + $WS_SYSMENU + $WS_VISIBLE, $WS_EX_CONTEXTHELP + $WS_EX_STATICEDGE) If $fenetrePrincipale <> 0 Then $imageFond = GUICtrlCreatePic($imageFond, 0, 0, 245, 130) GUICtrlSetState($imageFond, $GUI_DISABLE) ; au cas ou le fond se mettrait avant les bouttons $inputValAchercher = GUICtrlCreateInput("", 20, 20, 200, 22) $bouttonRecherche = GUICtrlCreateButton("Chercher", 20, 50, 200, 25) $bouttonExit = GUICtrlCreateButton("Sortir", 20, 85, 200, 25) but (i'm a big noisy man ^^) the temp file created with _tempFile() function don't delete the file in my temp directory, is it normal ? 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