How to set scroll position of rich text box control?
问题 I am using 2 Rich Text Boxes on winforms 4 (customRTB1 and customRTB2). Both of the rtb's have same text. What I want to achieve is, when one rtb (customRTB1) is scrolled down, the other rtb (customRTB2) also should be scrolled to exactly same position as customRTB1. I attempted this: public class CustomRTB : RichTextBox { #region API Stuff [DllImport("user32.dll", CharSet = CharSet.Auto)] public static extern int GetScrollPos(IntPtr hWnd, int nBar); [DllImport("user32.dll")] public static