方法比较多,根据你的需求,在au3最简单的是选择文本隐藏选择显示:#include <GuiRichEdit.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Local $hGui, $hRichEdit, $iMsg
$hGui = GUICreate("隐藏光标", 320, 350, -1, -1)
$hRichEdit = _GUICtrlRichEdit_Create($hGui, "有光标", 10, 10, 300, 220, _
BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL))
GUISetState()
Sleep(2000)
_GUICtrlRichEdit_AppendText($hRichEdit, @CR & "隐藏选择文本无光标1")
_GUICtrlRichEdit_HideSelection($hRichEdit, True)
_SendMessage($hRichEdit, $EM_SETSEL, 0, 1)
Sleep(2000)
_GUICtrlRichEdit_AppendText($hRichEdit, @CR & "隐藏选择文本无光标2")
_SendMessage($hRichEdit, $EM_SETSEL, 0, 1)
While True
$iMsg = GUIGetMsg()
Select
Case $iMsg = $GUI_EVENT_CLOSE
_GUICtrlRichEdit_Destroy($hRichEdit)
Exit
EndSelect
WEnd
|