|
-
Aug 24th, 2003, 04:36 PM
#1
Thread Starter
Addicted Member
Delete Line in text
Hey.
How can i delete the last line in a text box.
Thanks
Sean
-
Aug 24th, 2003, 04:42 PM
#2
I wonder how many charact
go backwards through the string, once you hit a chr$(13), delete everything from that index forward...
-
Aug 24th, 2003, 04:54 PM
#3
Originally posted by nemaroller
go backwards through the string, once you hit a chr$(13), delete everything from that index forward...
Bleh?
Using the textbox's functions. It has a function to get how many lines there are within a textbox and then you can work from there.
I would give you code or somehting, but I'm on the wrong computer, if I'm on later and no one has helped you maybe I can throw something together
-
Aug 24th, 2003, 05:03 PM
#4
Thread Starter
Addicted Member
sounds great.
Yeah if you could when you get a chance that would be great!!.
Thanks
Sean
-
Aug 24th, 2003, 06:19 PM
#5
I wonder how many charact
I was unaware of the Lines member of the Textbox... obviously, that would be alot easier for lines under 5,000 long...
VB Code:
If TextBox1.Lines.Length > 0 Then
Dim r(TextBox1.Lines.Length - 2) As String
Array.Copy(TextBox1.Lines, r, r.Length)
Array.Clear(TextBox1.Lines, 0, TextBox1.Lines.Length)
TextBox1.Lines = r
End If
Last edited by nemaroller; Aug 24th, 2003 at 06:29 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|