Hello:
I need to sroll an rtb upward (not talking about scroll bars) when the number of llines gets above a variable limit. I'm not really wanting to resize the RTB either...just want to delete the top line of the RTB (mayt have 1000 lines or so of text).
I've tried a few variations of this (vbCR, vs vbCrLf, etc), but all I get is a blanked out box (its erasing ALL of the text)...this way is also probably slow since it deals with a potentially huge string.Code:nRet = SendMessage(rtbCmdLog.hwnd, EM_GETLINECOUNT, 0&, ByVal 0&) Do While nRet > intLineLimit rtbCmdLog = Mid(rtbCmdLog, InStr(rtbCmdLog, vbCrLf) + 1) 'delete 1st line? nRet = SendMessage(rtbCmdLog.hwnd, EM_GETLINECOUNT, 0&, ByVal 0&) 'get new line count (reduced lines) rtbCmdLog.Refresh Loop 'continue deleting lines at top




Reply With Quote
