(je me suis permis de faire 2-3 modifs pour la lisibilité du code, en remettant les choses dans l'ordre ou elles s'affichent dans la GUI)
► Afficher le texte
Code : Tout sélectionner
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
;Opt("GUIOnEventMode", 1)
;GUIRegisterMsg($WM_COMMAND, "DoubleClick")
#region ### START Koda GUI section ### Form=C:\Program Files\AutoIt3\SciTE\Koda\Forms\GuiChromeProfil.kxf
;GUI PRINCIPAL
Global $InstallDir, $UserName, $DossierSelectionne, $Form2, $VersionIni, $VersionBDR, $NOM_ZIP, $Resultat, $LBN_DBLCLK
Local $color = 0xFFFFFF
If RegRead("HKEY_CURRENT_USER\Control Panel\Desktop", "LogPixels") <> "" Then
Global $FontSize = 8.5 * 96 / RegRead("HKEY_CURRENT_USER\Control Panel\Desktop", "LogPixels")
Else
Global $FontSize = 8.5
EndIf
global $FontWeight = 400
Global $ChromeManager = GUICreate("Google Chrome - Choisissez un profil utilisateur", 345, 218, 192, 124)
;GUISetOnEvent($GUI_EVENT_CLOSE, "Sortie")
$backgroundColor = GUISetBkColor($color, $ChromeManager)
Global $Label1 = GUICtrlCreateLabel(" Chrome conserve vos préférences et paramètres dans votre profil", 8, 8, 324, 17)
GUICtrlSetFont(-1, $FontSize, $FontWeight, 0, "MS Sans Serif")
;;GUICtrlSetFont(-1,8, 10, 400, 0, "MS Sans Serif")
Global $CreateProfil = GUICtrlCreateButton("Créer un profil", 8, 32, 145, 33, $WS_GROUP)
GUICtrlSetFont(-1, $FontSize, $FontWeight, 2, "MS Sans Serif")
;GUICtrlSetOnEvent($CreateProfil, "CreateProfil") ; *****
;;GUICtrlSetFont($CreateProfil,14, 10, 400, 0, "MS Sans Serif")
Global $Delete = GUICtrlCreateButton("Supprimer un profil", 8, 80, 145, 33, $WS_GROUP)
GUICtrlSetFont(-1, $FontSize, $FontWeight, 2, "MS Sans Serif")
;GUICtrlSetOnEvent($Delete, "Delete") ; *****
;;GUICtrlSetFont(-1,8, 10, 400, 0, "MS Sans Serif")
Global $Backup = GUICtrlCreateButton("Sauvegarder Profil", 8, 128, 147, 33, $WS_GROUP)
GUICtrlSetFont(-1, $FontSize, $FontWeight, 2, "MS Sans Serif")
;GUICtrlSetOnEvent($Backup, "Backup") ; *****
Global $ListProfil = GUICtrlCreateList("", 168, 48, 169, 73)
GUICtrlSetFont(-1, $FontSize, $FontWeight, 2, "MS Sans Serif")
Global $StartChrome = GUICtrlCreateButton("Demarrer Chrome", 144, 168, 97, 33, $WS_GROUP)
GUICtrlSetFont(-1, $FontSize, $FontWeight, 2, "MS Sans Serif")
;GUICtrlSetOnEvent($StartChrome, "Start") ; *****
Global $Quit = GUICtrlCreateButton("Quitter", 249, 168, 87, 33, $WS_GROUP)
GUICtrlSetFont(-1, $FontSize, $FontWeight, 2, "MS Sans Serif")
;GUICtrlSetOnEvent($Quit, "Sortie") ; *****
GUISetState(@SW_SHOW, $ChromeManager)
#endregion ### END Koda GUI section ###
Do
$Msg = GUIGetMsg()
Switch $Msg
Case $StartChrome
;Start()
Case $CreateProfil
;CreateProfil()
Case $Delete
;Delete()
Case $Backup
;Backup()
Case $Quit
Exit
EndSwitch
Until $Msg = $GUI_EVENT_CLOSE