本文介绍了Winforms:插入符号位置的屏幕位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何找到标准 Winforms TextBox 的插入符号的屏幕位置?
How can I find the screen position of the caret for a standard Winforms TextBox?
推荐答案您只能使用本机互操作来做到这一点:GetCaretPos
You can do it only with native interop: GetCaretPos
[DllImport("user32.dll")] [return: MarshalAs(UnmanagedType.Bool)] static extern bool GetCaretPos(out Point lpPoint);更多推荐
Winforms:插入符号位置的屏幕位置
发布评论