Code : Tout sélectionner
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Excel.au3>
#include <IE.au3>
#include <WinAPI.au3>
#include <constants.au3>
$oIE = _IECreateEmbedded ()
#Region ### START Koda GUI section ### Form=
Opt("GUIResizeMode", $GUI_DOCKALL) ;on fige par defaut tous les controls de la GUI
Global $Form1 = GUICreate("Mailing avec plusieurs pièces jointes", 965, 824, 189, 130, $WS_SIZEBOX )
GUICtrlCreateObj($oIE, 16, 256, 929, 491)
GUICtrlSetResizing(-1 , $GUI_DOCKBORDERS) ; redimensionnable
Global $Label1 = GUICtrlCreateLabel("Fichier Excel des emails + pièce jointe personnalisée", 16, 17, 250, 16)
Global $Input1 = GUICtrlCreateInput("", 16, 32, 657, 24)
Global $Button1 = GUICtrlCreateButton("Selectionner", 680, 32, 75, 24)
Global $Label2 = GUICtrlCreateLabel("Pièce jointe commune 1", 16, 64, 117, 16)
Global $Input2 = GUICtrlCreateInput("", 16, 80, 273, 24)
Global $Button2 = GUICtrlCreateButton("Selectionner", 296, 80, 75, 24)
Global $Label3 = GUICtrlCreateLabel("Pièce jointe commune 2", 16, 112, 117, 16)
Global $Input3 = GUICtrlCreateInput("", 16, 128, 273, 24)
Global $Button3 = GUICtrlCreateButton("Selectionner", 296, 128, 75, 24)
Global $Label4 = GUICtrlCreateLabel("Pièce jointe commune 3", 400, 64, 117, 16)
Global $Input4 = GUICtrlCreateInput("", 400, 80, 273, 21)
Global $Button4 = GUICtrlCreateButton("Selectionner", 680, 80, 75, 24)
Global $Label5 = GUICtrlCreateLabel("Pièce jointe commune 4", 400, 112, 117, 16)
Global $Input5 = GUICtrlCreateInput("", 400, 128, 273, 21)
Global $Button5 = GUICtrlCreateButton("Selectionner", 680, 128, 75, 24)
Global $Label6 = GUICtrlCreateLabel("Objet du mail :", 16, 184, 82, 16)
Global $Input6 = GUICtrlCreateInput("", 16, 200, 617, 24)
;Global $Checkbox1 = GUICtrlCreateCheckbox("HTML", 656, 200, 47, 17)
Global $Label7 = GUICtrlCreateLabel("Message:", 16, 240, 50, 16)
;Global $Edit1 = GUICtrlCreateEdit("", 16, 256, 929, 441)
Global $Pic1 = GUICtrlCreatePic(@scriptdir & "\logo.jpg", 840, 27, 75, 75)
GUICtrlSetData(-1, "")
Global $Button6 = GUICtrlCreateButton("GO !", 864, 762, 75, 25)
GUICtrlSetResizing(-1 , $GUI_DOCKSIZE) ; position relative du bouton dans la fenetre en fonction du redimensionnement
Global $Group1 = GUICtrlCreateGroup("Confirmations", 720, 168, 137, 73)
Global $confirm_envoi = GUICtrlCreateCheckbox("Envoi", 736, 192, 97, 17)
Global $confirm_lecture = GUICtrlCreateCheckbox("Lecture", 736, 216, 97, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
Global $style = _WinAPI_GetWindowLong($Form1, $GWL_STYLE)
GUIRegisterMsg($WM_ENTERSIZEMOVE,"EnterSizeMove")
GUIRegisterMsg($WM_EXITSIZEMOVE,"ExitSizeMove")
while 1
wend
Func EnterSizeMove($hW,$iM,$wP,$lP)
_WinAPI_SetWindowLong($Form1, $GWL_STYLE, BitOr($style, $WS_CLIPCHILDREN))
EndFunc
Func ExitSizeMove($hW,$iM,$wP,$lP)
_WinAPI_SetWindowLong($Form1, $GWL_STYLE, $style)
EndFunc