Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RTF: how hide the selection of .seltext?

Status
Not open for further replies.

Robertge

Programmer
Jul 4, 2002
18
IT
Hi,

using a RTF box, I want to work on a single row (current) every time that I press the key-down/key-up arrows of the keyboard.

In one sub I compute the current column and the line lenght of the line where the cursor is positioned (using sendmessage api)

When keyup or keydown is pressed I use this code inside KeyDown event

with FormMDI
.ActiveForm.rtfbox1.SelStart = .ActiveForm.rtfbox1.SelStart - WCurrentColumn
.ActiveForm.rtfbox1.SelLength = WLenLine
str_1 = .ActiveForm.rtfbox1.SelText
end with

My little problem is that on the RTF appears and desappears the selection on the line everytime I press the key up/down.

I tried with HideCaret/showCaret Api, but is the same.

Someone can sujest me a solution to hide this "stupid" selection? I'm using VB 5.0

Thanks
 
ok, I found by myself

'Lock the window update for flickering using API
LockWindowUpdate form.hwnd

....


'Unlock windowupdate for flickering using API
LockWindowUpdate False

Bye
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top