简体   繁体   中英

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.

How do I do this?

Thanks!

Isaac

There is no managed support for dealing with carets in the .NET Framework. You'll have to use p/invoke to change the caret:

Carets: http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/resources/carets.asp

http://pinvoke.net is a valuable resource when using p/invoke.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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