看到这个标题,很多人会想,这还不简单么?
- this.richTextBox1.SelectAll();
- this.richTextBox1.SelectionIndent = 20;
- this.richTextBox1.SelectionRightIndent = 20;
- this.richTextBox1.SelectionStart = this.richTextBox1.Rtf.Length;
这就搞定了。
没错,当时我也这么想,可是我把Word的内容粘帖进来,如果Word里面本身已经有缩进的,那就傻了~~~~~
找遍了richTextBox也没看到有什么属性或者方法让我用用,逼的我没办法了,使用API吧,NND
首先声明一个SendMessage的API
- [DllImport("user32.dll", EntryPoint = "SendMessageA", CallingConvention = CallingConvention.S