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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -