Code : Tout sélectionner
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include "GUICtrlPic.au3"
#include <WinAPI.au3>
#include <EditConstants.au3>
#Region ### START Koda GUI section ### Barre
Global $Form1 = GUICreate("Raccourcis", 255, 70, -1, @DesktopHeight-120,$WS_POPUP,$WS_SYSMENU + $WS_EX_TOOLWINDOW)
Global $Label1 = GUICtrlCreateLabel("", 0, 5, 50, 17, $SS_CENTER)
GUICtrlSetFont(-1, 8, 400, 0, "TimeNewRoman")
Global $Button1 = _GUICtrlPic_Create("C:\CHEMIN\Carreoff.png" , 0, 20, 50, 50) ;Le bouton pour afficher la fenêtre de raccourcis
GUICtrlSetCursor (-1, 0)
Global $Button1bis = _GUICtrlPic_Create("C:\CHEMIN\Carre.png" , 0, 20, 50, 50) ;Le bouton qui lance le raccourcis
GUICtrlSetCursor (-1, 0)
Global $option = GUICtrlCreateButton("X", 240, 20, 15, 15) ;Le bouton "option"
GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
#Region ### START Koda GUI section ### Option
Global $Form2 = GUICreate("Raccourcis - options", 268, 161, -1, -1)
Global $Group1 = GUICtrlCreateGroup("Reset", 16, 8, 113, 145)
Global $Checkbox1 = GUICtrlCreateCheckbox("Raccourcis 1", 24, 24, 97, 17)
Global $Button5 = GUICtrlCreateButton("Reset", 32, 120, 75, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
Global $Button6 = GUICtrlCreateButton("Ok", 160, 120, 75, 25)
Global $Group2 = GUICtrlCreateGroup("Quitter", 144, 8, 113, 97)
Global $Button7 = GUICtrlCreateButton("Quitter", 162, 48, 75, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
#EndRegion ### END Koda GUI section ###
#Region ### START Koda GUI section ### R1
Global $Form3 = GUICreate("Créer un raccourcis", 347, 264, -1, -1)
Global $Label5 = GUICtrlCreateLabel("Fenêtre vide, à titre d'exemple", 24, 100, 262, 17)
#EndRegion ### END Koda GUI section ###
Local $color = 0x121314 ;Cette partie sert à mettre le fond invisible
GUISetBkColor($color, $Form1) ; ""
_WinAPI_SetLayeredWindowAttributes($Form1, $color,255) ; ""
GUISetState() ; ""
While 1
$nMsg = GUIGetMsg(1)
Switch $nMsg[0]
Case $GUI_EVENT_CLOSE
If $nMsg[1] = $Form2 Then ;Si le message de fermer vient de la Form2
GUISetState(@SW_HIDE,$Form2) ;On la masque
ElseIf $nMsg[1] = $Form3 Then
GUISetState(@SW_HIDE,$Form3)
Else
Exit
EndIF
Case $option
GUISetState(@SW_SHOW,$Form2)
Case $Button7
Exit
Case $Button6
GUISetState(@SW_HIDE,$Form2)
Case $Button1
GUISetState(@SW_SHOW,$Form3)
EndSwitch
WEnd