To prevent your textbox flickering when you add new lines always ensure the total string height is greater than the height of the textbox.
E.g Create flicker fix string
VB Code:
Dim flicker_fix as String Const MAX_ROWS=50 For a = 0 To MAX_ROWS flicker_fix = flicker_fix & vbCrLf Next
always append this string to the end of your string you wish to add
E.G
VB Code:
Dim a as Long Dim new_msg as String For a = 0 to 20 new_msg=new_msg & "More lines" & str(a) & vbCrLf text1.text = new_msg & flicker_fix Next
This is only an example, obviously you would not write the code like this, but you get the idea.
I have used this where the LockWindowApi was not suitable.
Cheers
Rick


Reply With Quote