简体   繁体   English

如何在C#的文本框中将插入记号更改为插入类型(闪烁的框而不是闪烁的行)?

[英]How do you change the caret to the insert type (a flashing box instead of a flashing line) in a textbox in C#?

I've set textbox.InsertKeyMode = InsertKeyMode.Overwrite and now I want the caret to change to the traditional flashing box. 我已经设置了textbox.InsertKeyMode = InsertKeyMode.Overwrite,现在我想将插入符号更改为传统的闪烁框。

How do I do this? 我该怎么做呢?

Thanks! 谢谢!

Isaac 以撒

There is no managed support for dealing with carets in the .NET Framework. .NET Framework中没有托管的支持来处理插入符号。 You'll have to use p/invoke to change the caret: 您必须使用p / invoke更改插入符号:

Carets: http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/resources/carets.asp 维护者: http : //msdn.microsoft.com/library/zh-cn/winui/winui/windowsuserinterface/resources/carets.asp

http://pinvoke.net is a valuable resource when using p/invoke. 使用p / invoke时, http://pinvoke.net是有价值的资源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM