Winforms: Screen Location of Caret Position

前端 未结 2 1444
温柔的废话
温柔的废话 2021-01-19 07:45

How can I find the screen position of the caret for a standard Winforms TextBox?

2条回答
  •  失恋的感觉
    2021-01-19 08:17

    I have been using the TextBox.GetPositionFromCharIndex function. It gives coordinates relative to the top left of the the TextBox.

提交回复
热议问题