Page 1 sur 1

[R] Image dans GUI

Posté : mar. 19 févr. 2008 19:09
par astaroth
Bonjour,

Voila j'ai mis une image de fond dans mon/ma GUI mais seulement une fois que j'ai fait ca les boutons créer ne fonctionne plus.. :?

Il y a un moyen de contourner le problème?

Merci

Re: Image dans GUI

Posté : mar. 19 févr. 2008 19:22
par eln
Bonjour

Un bout de code ?

Re: Image dans GUI

Posté : mar. 19 févr. 2008 19:32
par astaroth

Code : Tout sélectionner

#include <GUIConstants.au3>

GUICreate("blabla", 400, 280)
GUICtrlCreatePic("C:\Users\Administrateur\Desktop\Images\Capturer.jpg",0,0, 400,280)

$Button_1 = GUICtrlCreateButton ("test",  10, 30, 100)
GUICtrlSetCursor(-1, 0)
$Button_2 = GUICtrlCreateButton ( "Button Test",  10, 60, 100)
GUICtrlSetCursor(-1, 0)

GUISetState ()      ; will display an  dialog box with 2 button

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $Button_1
            Run('Notepad.exe')    ; Will Run/Open Notepad
        Case $msg = $Button_2
            MsgBox(0, 'Testing', 'Button 2 was pressed')    ; Will demonstrate Button 2 being pressed
    EndSelect
Wend

Re: Image dans GUI

Posté : mar. 19 févr. 2008 19:46
par astaroth
Bon j'ai trouver ma propre réponse par hazard :lol:

Code : Tout sélectionner

GUICtrlCreatePic("C:\Users\Administrateur\Desktop\Images\Capturer.jpg",0,0, 400,280, $SS_CENTERIMAGE)
j'ai rajouté ca et ca marche

Merci quand meme. :)