#include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <ProgressConstants.au3> $pic=GUICreate("Attente ouverture de session", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP,$WS_EX_LAYERED) $status_icon = GUICtrlCreatePic("mon_fond.jpg", 0, 0, @DesktopWidth, @DesktopHeight,BitOR($SS_NOTIFY,$WS_GROUP)) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) Global $secondes = 0 Global $temps_attente = 10 Global $temps_attente_gui = $temps_attente Global $temps_sleep = 1000 $Label1 = GUICtrlCreateLabel("Ouverture de session ...", (@DesktopWidth/2) - 250, (@DesktopHeight/2) - 100, 800, 70) GUICtrlSetFont(-1, 36, 800, 0, "Segoe UI Light" ) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $Label2 = GUICtrlCreateLabel("Ouverture dans...", (@DesktopWidth/2) - 163, @DesktopHeight/2, 326, 50) GUICtrlSetFont(-1, 26, 800, 0, "Segoe UI Light" ) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) Global $idProgressbar1 = GUICtrlCreateProgress((@DesktopWidth/2) - 100, (@DesktopHeight/2) + 100, 200, 20) GUICtrlSetColor(-1, 32250); not working with Windows XP Style GUISetState(@SW_SHOW) Local $iSavPos = 0; progressbar-saveposition Local $i = 0 _AlwaysOnTop() Do GUICtrlSetData($idProgressbar1, $i) $i += 100/$temps_attente GUICtrlSetData($Label2 , "Ouverture dans "& $temps_attente_gui) Sleep($temps_sleep) $temps_attente_gui -=1 If $temps_attente_gui = 0 Then ExitLoop Until 0 = 1 Func _AlwaysOnTop() ; on retrouve le handle de la fenêtre active Local $hWnd = WinGetHandle("[ACTIVE]" ) ; on positionne la fenêtre active devant suivant le handle trouvé avant WinSetOnTop($hWnd, "", 1) EndFunc |