Code : Tout sélectionner
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Form2", 332, 60, 292, 264)
$n1 = GUICtrlCreateInput("n1", 16, 8, 81, 40)
GUICtrlSetFont(-1, 20, 400, 0, "MS Sans Serif")
$n2 = GUICtrlCreateInput("n2", 121, 8, 81, 40)
GUICtrlSetFont(-1, 20, 400, 0, "MS Sans Serif")
$Label1 = GUICtrlCreateLabel("X", 100, 12, 21, 40)
GUICtrlSetFont(-1, 20, 800, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("=", 208, 16, 33, 25, $WS_GROUP)
GUICtrlSetFont(-1, 40, 400, 0, "MS Sans Serif")
$Label2 = GUICtrlCreateLabel("-------------------", 248, 20, 80, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $Button1
GUICtrlSetData ($Label2, GUICtrlRead ($n1) * GUICtrlRead ($n2) )
EndSwitch
WEnd