#include #include #include CreateWindow() Func CreateWindow() Local $hGUI = GUICreate("ccScan for Box", 700, 500, -1, -1, $WS_SIZEBOX + $WS_SYSMENU) Local $iPic = GUICtrlCreatePic("MenuBkg.jpg", -1, -1, 700, 500) Local $Test1Button = GUICtrlCreateButton("TEST 1", 300, 160, 200, 40) Local $Test2Button = GUICtrlCreateButton("TEST 2", 300, 220, 200, 40) Local $ExitButton = GUICtrlCreateButton("Exit", 300, 280, 200, 40) GUISetState(@SW_SHOW, $hGUI) While 1 ; $aMsg = GUIGetMsg() Switch GUIGetMsg() Case $Test1Button MsgBox($MB_SYSTEMMODAL, "GUI Event", "Selected TEST 1!") Case $Test2Button MsgBox($MB_SYSTEMMODAL, "GUI Event", "Selected TEST 2!") Case $ExitButton MsgBox($MB_SYSTEMMODAL, "GUI Event", "Selected... Exiting!") ExitLoop Case $GUI_EVENT_CLOSE MsgBox($MB_SYSTEMMODAL, "GUI Event", "ExitBox selected... Exiting!") ExitLoop EndSwitch WEnd GUIDelete($hGUI) EndFunc