使文本框不闪烁?

问题描述:

我正在尝试获得一个我可以点击的控件,按任意键(Tab 键除外)并让它接受输入.我尝试使用这个但遇到了问题方向键改变焦点.这个问题就在这里.

I am trying to get a control i can click on, press any keys (except tab) and have it take in the input. I tried using this and had a problem with the arrow keys changing the focus. That question is here.

文本框似乎可以工作,但我不喜欢它闪烁的方式.就像显示下一个字母放置位置的行一样.我该如何解决这个问题?

The textbox seems to work but i dont like how it blinks. As in the line that shows where you next letter will be placed. How do i fix this?

如果您基于标准文本框创建 UserControl,您可以使用 [Control::IsInputKey][1] 覆盖导致控件失去焦点的默认行为.

If you create a UserControl based on the standard textbox you can use [Control::IsInputKey][1] to override default behaviour which causes the control to lose focus.