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

twig - Using Twigbridge in a Laravel 5.1 Package -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -

jdbc - Not able to establish database connection in eclipse -