Re: Scrolling a RichTextBox
Quote:
Originally posted by Jdo300
Ok, here's my problem. I have a RighTextBox, and I want my program to be able to automatically scroll the Horozontal scrollbar all the way back to the left. I tryed using the SendMessage API with the EM_SCROLL message, but I can't seem to get it to work. Any ideas?
EM_Scroll would not help.
use these constants ..
VB Code:
Private Const SB_LINEDOWN As Long = 1
Private Const SB_LINEUP As Long = 0
Private Const SB_PAGEDOWN As Long = 3
Private Const SB_PAGEUP As Long = 2
Private Const WM_HSCROLL = &H114
Private Const WM_VSCROLL = &H115
'examples :
intRet = SendMessage(richtextbox1.hwnd, _
WM_HSCROLL, _
SB_LINEUP, 0)
'and
intRet = SendMessage(richtextbox1.hwnd, _
WM_VSCROLL, _
SB_PAGEUP, 0)
'And your rtb will scroll like hell ..:D