public ScrollInfo GetScrollInfo(RichTextBox textBox) { ScrollInfo scrollInfo = new ScrollInfo(); scrollInfo.fMask = (uint)Types.ScrollInfoMask.SIF_ALL; scrollInfo.cbSize = (uint)Marshal.SizeOf(scrollInfo); GetScrollInfo(mdTabChatMessageTextBox.Handle, (int)Types.ScrollBarType.SbVert, ref scrollInfo); return scrollInfo; }
private static extern bool GetScrollInfo(IntPtr hwnd, int nBar, ref ScrollInfo lpsi);