使用后面的C#代码获取多行文本框中的当前鼠标光标位置

问题描述:

我正在搜索一个代码,通过它我可以从后面的C#代码获取Multiline TextBox控件中的当前鼠标位置.

基本上,我必须在当前鼠标光标所在的位置的多行文本框中插入一些给定的文本.

I am searching for a code by which i could get the current mouse position in a Multiline TextBox control from C# code behind.

Basically i have to insert some given text in a Multiline Text box at the position where the mouse cursor presently is.

查找SelectionStart属性.

HTH
Look up the SelectionStart property.

HTH