I want to have 2 (rich)texboxes (vc# 2k8) with same scrolling... so when I scroll tb1 the tb2 scrolls to the same position. I use this functions:
[DllImport(\"us
I found answer
[DllImport("user32.dll")]
static extern int SetScrollPos(IntPtr hWnd, int nBar,
int nPos, bool bRedraw);
[DllImport("User32.Dll", EntryPoint = "PostMessageA")]
static extern bool PostMessage(IntPtr hWnd, uint msg, int wParam, int lParam);
public void ScrollTo(int Position) {
SetScrollPos((IntPtr)textBox1.Handle, 0x1, Position, true);
PostMessage((IntPtr)textBox1.Handle, 0x115, 4 + 0x10000 * Position, 0);
}