#include #include #include #include #include #include #include _DebugSetup("DummyApp",false,2) Example() Func Example() GUICreate("My GUI edit") ; will create a dialog box that when displayed is centered GUISetState(@SW_SHOW) Local $idMyedit = GUICtrlCreateEdit("", 10, 10, 300, 350, $ES_AUTOVSCROLL + $WS_VSCROLL) _MyDebug("openfile") local $hdFile=fileopen("largetextfile.txt",$FO_READ ) local $fileContent=FileRead($hdFile) fileclose($hdFile) _MyDebug("closefile") _MyDebug("update ctrlfile start") GUICtrlSetData($idMyedit,$fileContent) _MyDebug("update ctrlfile done") ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete() EndFunc ;==>Example func _MyDebug($debugtext,$debugline = @ScriptLineNumber) _DebugOut ("("&@HOUR&":"&@MIN&":"&@SEC&"."&@MSEC&") - -->Line" & StringFormat("%04d", $debugline) & "):" & @TAB & $debugtext) EndFunc