Code : Tout sélectionner
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("Form1", 615, 437, 192, 124)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
HotKeySet("d", "ShowMessage")
EndSwitch
WEnd
Func ShowMessage()
MsgBox($MB_SYSTEMMODAL, "", "Ceci est un message.")
EndFunc ;==>ShowMessage
alors qu'avec ce code
Code : Tout sélectionner
#include <MsgBoxConstants.au3>
While 1
Sleep(100)
HotKeySet("d", "ShowMessage")
WEnd
Func ShowMessage()
MsgBox($MB_SYSTEMMODAL, "", "Ceci est un message.")
EndFunc ;==>ShowMessage