vb.net - To remove last line of a richtextbox -


i need remove last line of richtextbox. tried several ways. nothing worked. please me

for t = len(texto) 0 step -1         if mid(texto, t, 1) = vbcr             c = c + 1             'texto = mid(texto, 1, t - 1) don't         end if         '         if c = 2 exit     next      richtextbox2.text = left$(texto, t - 1) 

dim lastline integer = ubound(richtextbox2.lines) if lastline > -1     dim newlines() string     integer = 0 lastline         if < lastline             redim preserve newlines(i)             newlines(i) = richtextbox2.lines(i)         end if     next     richtextbox2.lines = newlines end if 

Comments

Popular posts from this blog

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -