获取光标所在行索引

int index = richTextBox1.GetFirstCharIndexOfCurrentLine();
int line = richTextBox1.GetLineFromCharIndex(index);

猜你喜欢

转载自www.cnblogs.com/jizhiqiliao/p/10038818.html