Sign in to follow this  
Followers 0
ddeerr

background image

5 posts in this topic

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...


MsgBox(0, "Steven Seagal", "Les poches bourrées de Pesos")

Share this post


Link to post
Share on other sites



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]

Share this post


Link to post
Share on other sites

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

tx 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 ?


MsgBox(0, "Steven Seagal", "Les poches bourrées de Pesos")

Share this post


Link to post
Share on other sites

I think this is the reason for using FileInstall(). :whistle:

Share this post


Link to post
Share on other sites

I think this is the reason for using FileInstall(). :whistle:

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 ?


MsgBox(0, "Steven Seagal", "Les poches bourrées de Pesos")

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  
Followers 0