I'm just curious why this doesn't work. Why doesn't the program exit when exit menu is clicked. What am I doing wrong?
#include
#include
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 221, 173, 192, 114)
$exit = GUICtrlCreateMenu("Exit")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $exit
;This doesn't get called
Exit
EndSwitch
WEnd