#NoTrayIcon #include #include #include #include #include #include #include Opt("MustDeclareVars", 1) Local $hExStyle, $hStyle, $hWnd, $iHeight, $iLeft, $iTop, $iWidth, $sTitle, $hGlo_GuiWE, $hGlo_WEControl $iWidth = ScreenSizeAvailable()[0] - 6 $iHeight = ScreenSizeAvailable()[1] - 24 $iLeft = 0 $iTop = 0 $hStyle = BitOR($WS_CAPTION, $WS_POPUP, $WS_SYSMENU) $hExStyle = $WS_EX_DLGMODALFRAME $hGlo_GuiWE = GUICreate($sTitle, $iWidth , $iHeight, $iLeft, $iTop, $hStyle, $hExStyle, $hWnd) $hStyle = BitOR($ES_MULTILINE, $ES_WANTRETURN, $WS_VSCROLL, $WS_HSCROLL, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL) $hExStyle = $WS_EX_CLIENTEDGE $hGlo_WEControl = _GUICtrlRichEdit_Create($hGlo_GuiWE, "", 0, 0, $iWidth, $iHeight, $hStyle, $hExStyle) _GUICtrlRichEdit_StreamFromFile($hGlo_WEControl, "C:\1.txt") GUISetState(@SW_SHOW, $hGlo_GuiWE) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete($hGlo_GuiWE) Exit ; Script End Func ScreenSizeAvailable() Local $tWorkArea Local $aResult[2] $tWorkArea = DllStructCreate($tagRECT) _WinAPI_SystemParametersInfo($SPI_GETWORKAREA, 0, DllStructGetPtr($tWorkArea)) $aResult[0] = DllStructGetData($tWorkArea, "Right") - DllStructGetData($tWorkArea, "Left") $aResult[1] = DllStructGetData($tWorkArea, "Bottom") - DllStructGetData($tWorkArea, "Top") Return $aResult EndFunc ;==>ScreenSizeAvailableGet