Mr60s Posted October 31, 2003 Posted October 31, 2003 Hi ! I found this code example in the FAQ at top of this forum, but i got this problem. Can anyone help me make it, so i can use it in VB.net? Thanks allot. const int SB_VERT = 1; const int EM_SETSCROLLPOS = 0x0400 + 222; [DllImport("user32", CharSet=CharSet.Auto)] public static extern bool GetScrollRange(IntPtr hWnd, int nBar, out int lpMinPos, out int lpMaxPos); [DllImport("user32", CharSet=CharSet.Auto)] public static extern IntPtr SendMessage(IntPtr hWnd, int msg, int wParam, POINT lParam); [structLayout(LayoutKind.Sequential)] public class POINT { public int x; public int y; public POINT() { } public POINT(int x, int y) { this.x = x; this.y = y; } } // Example -- scroll the RTB so the bottom of the text is always visible. int min, max; GetScrollRange(richTextBox1.Handle, SB_VERT, out min, out max); SendMessage(richTextBox1.Handle, EM_SETSCROLLPOS, 0, new POINT(0, max - richTextBox1.Height)); Quote
Mr60s Posted October 31, 2003 Author Posted October 31, 2003 Never mind i found another way around my problem. Private Sub Console_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Console.TextChanged Console.SelectionStart = Len(Console.Text) Console.Focus() InputLine.Focus() End Sub This will scroll the RTP to the end. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.