Posponi repaint
'Lock window until ready
Declare Function LockWindowUpdate Lib "user32" Alias "LockWindowUpdate" (hwndLock As Long) As Long ''at the start of your program
LockWindowUpdate(edit.handle)'asume edit is the Qrichedit box.
'do the loop with the selatribute etc until whole text is done
lockwindowupdate(0)'repaint richedit.
'It even speed up the proces because richedit isn't repaint every thing is changed.
|