如何隐藏TMEMO的光标?(注意不是鼠标光标)(50分)

  • 主题发起人 主题发起人 pigprince
  • 开始时间 开始时间
Ohh, Hide Cursor, not Mouse Pointer, :)
 
Sorry, hide caret, not mouse pointer (that is called "cursor"), :)

 
看看这个例子:
xixi , 简单吧!

HideCaret(0); {use 0 to let windows find which window
owns the caret, then hide it. Otherwise, you can directly
tell the HWND of the window that owns the caret, :}
 
Hehe, 不过我试了以下, 当您Click, 或者用Tab键激活它时,
TMemo却又把它显示出来了,
所以要再MouseClick, KeyUp等地方放上这样的调用,:)
 
Hehe, 不过我试了以下, 当您Click, 或者用Tab键激活它时,
TMemo却又把它显示出来了,
所以要在MouseDown, KeyUp放上这样的调用, (Not KeyDown)
And do not set the TabOrder of the Memo to be first ordered, that's
OK! :)
 
要改动 DefaultHandler 呀
 
dear huizhang, the DefaultHandler is in the
source of the TMemo, right?
 
No, do "HideCaret(0)" just in the events of Memo control.


 
Which event?
 
要在TMemo的MouseDown, KeyUp放上这样的调用, (Not KeyDown)
And do not set the TabOrder of the Memo to be first ordered

我已经试过了, 只有当您用Tab键把输入焦点切换到Memo上时,
才会瞬间闪现一下光标, 其他时间则一直静悄悄的, 应该合格了
吧? :)
 
在MEMO的ONFOCUS中写点东西不就行了?
 
thx, cj, huizhang and the winner!
 
后退
顶部