How do I get the systems caret period in .NET?

限于喜欢 提交于 2019-12-11 12:06:17

问题


How do I know the exact period of the caret blinking on a certain Windows system? (Programmatically using .NET)


回答1:


You can P/Invoke it.

http://www.pinvoke.net/default.aspx/user32.getcaretblinktime




回答2:


You can always simply P/Invoke GetCaretBlinkTime (Daniel's answer gives the copy/pastable signature).

If you don't mind having a reference to Windows Forms, there is also SystemInformation.CaretBlinkTime. Unfortunately it seems that the analogous SystemParameters class does not expose this setting.



来源:https://stackoverflow.com/questions/11986832/how-do-i-get-the-systems-caret-period-in-net

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!