If you use my sub just call it with 0 as the line number.Or if you want to write your own code just pass a negative number in lParam when you send the EM_LINESCROLL to scroll upwards. The number of lines you need to scroll up can be retrieved by sending EM_GETFIRSTVISIBLELINE.VB Code:
Call SetTopIndex(RichTextBox1, 0)




Reply With Quote