i'm developing an editor control in VB6 based on a rich text box which syntax highlightd for a programming language. my highlighting subroutine actually inserts the RTF code and replaces the .textRTF property every time it is run.

the trouble is, this routine sets the cursor position to 1 and scrolls up to the top of the box every time, and i just want it to appear to the user that the contents were colorized, and no scrolling took place.

is there a way to (possibly using the API):
- suspend refresh
- save the number of the first line visible in the rtbox
- EXECUTE MY HIGHLIGHTING SUBROUTINE
- jump back to that line number
- resume refresh

so that the highlighting looks smooth?