#include $formTest = GUICreate("Test Form", 400, 200, 900, 100) ; width, heigh, left, top $lblDesktop = GUICtrlCreateLabel("desktop size", 10, 10, 380, 30) ; left, top, width, height GUICtrlSetFont(-1, 14, 400, 0, "Liberation Sans Narrow") $lblMssg1 = GUICtrlCreateLabel("message 1", 10, 50, 380, 30) GUICtrlSetFont(-1, 14, 400, 0, "Liberation Sans Narrow") $lblMssg2 = GUICtrlCreateLabel("Image search not started", 10, 90, 380, 30) GUICtrlSetFont(-1, 14, 400, 0, "Liberation Sans Narrow") $cmdSearch = GUICtrlCreateButton("Search", 300, 150, 90, 30) GUICtrlSetFont(-1, 14, 400, 0, "Liberation Sans Narrow") GUISetState(@SW_SHOW) $sDeskTop = "Desktop width: " & @DesktopWidth & " height: " & @DesktopHeight ConsoleWrite($sDeskTop & @CRLF) GUICtrlSetData($lblDesktop, $sDeskTop) Func DoSearch() GUICtrlSetData($lblMssg2, "There is no search") EndFunc While 1 Local $aPos = MouseGetPos() ;ToolTip("x: " & $aPos[0] & ", y: " & $aPos[1], 1380, 50) GUICtrlSetData($lblMssg1, "x: " & $aPos[0] & ", y: " & $aPos[1]) $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE ExitLoop Case $cmdSearch DoSearch() EndSwitch WEnd