#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("TrayMenuMode",1)
$aboutit = TrayCreateItem("развернуть")
$abouti = TrayCreateItem("свернуть")
$aboutitem = TrayCreateItem("Jl-Creations.ru")
$aboutite = TrayCreateItem("Закрыть")
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 447, 192, 124)
$Button1 = GUICtrlCreateButton("Button1", 112, 40, 75, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_w()
EndSwitch
$msg = TrayGetMsg()
Select
Case $msg = 0
ContinueLoop
Case $msg = $aboutite
exit
Case $msg = $aboutit
GUISetState(@SW_SHOW)
Case $msg = $abouti
GUISetState(@SW_HIDE)
EndSelect
WEnd
func _w()
MsgBox("","",1)
EndFunc