473,387 Members | 3,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Delete first line of textbox

Hi All,

My textbox is a queue stack, after processing a line, I need to
process next line, and the first line should be removed to indicate
progress.

Should we check the new line by ourself ? and then use substring to
make a new string ?

Thanks!
Best regards,
Boki.

Jul 9 '07 #1
2 15012
Hi Boki

use the Lines array property of the textbox, this is an array of all lines
in a multiline textbox. After processing the first line, do the following

mytextbox.Text =
mytextbox.Text.SubString(mytextbox.lines[0].Length+Environment.Newline.Length);

this should remove the first line.

Regards

Roman

"Boki" <bo******@ms21.hinet.netschrieb im Newsbeitrag
news:11**********************@e16g2000pri.googlegr oups.com...
Hi All,

My textbox is a queue stack, after processing a line, I need to
process next line, and the first line should be removed to indicate
progress.

Should we check the new line by ourself ? and then use substring to
make a new string ?

Thanks!
Best regards,
Boki.

Jul 9 '07 #2
On Jul 9, 4:36 pm, "Roman Stehrenberger" <r_stehrenber...@hispeed.ch>
wrote:
Hi Boki

use the Lines array property of the textbox, this is an array of all lines
in a multiline textbox. After processing the first line, do the following

mytextbox.Text =
mytextbox.Text.SubString(mytextbox.lines[0].Length+Environment.Newline.Length);

this should remove the first line.

Regards

Roman

"Boki" <bokit...@ms21.hinet.netschrieb im Newsbeitragnews:11**********************@e16g2000p ri.googlegroups.com...
Hi All,
My textbox is a queue stack, after processing a line, I need to
process next line, and the first line should be removed to indicate
progress.
Should we check the new line by ourself ? and then use substring to
make a new string ?
Thanks!
Best regards,
Boki.
Got it, thanks ! :)

Boki.

Jul 9 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tor Erik Sønvisen | last post by:
Hi How can I read the first line of a file and then delete this line, so that line 2 is line 1 on next read? regards
1
by: Lumpierbritches | last post by:
Thank you in advance for any and all assistance, it is GREATLY appreciated. I was wondering if there is a way to tell Access 97 to compare the first line with other textboxes using the...
4
by: Amit Kulkarni | last post by:
Hi, I have small problem. I want to truncate a line in a text file using C file handling functions and write new line in place of it. How do I do it? e.g. "example.txt" Line 1: This is a...
1
by: VMI | last post by:
In my Windows app, if I'm in a multi-line textbox and I'm writing a postal address (ie. write ist line and press <Enter>, write 2nd line and press <Enter>, etc...) how can I make sure that the...
2
by: ryanbreakspear | last post by:
Hi all, Is there an easy way to delete the first line from a multi line text box? I've tried assigning the .Lines to various containers but can't seem to find an easy way to get the data back. ...
9
by: Juergen Huber | last post by:
hello, i am a dummy user in python and new in this programming language and so there will be questions, that´s for you no problem! i never have before programmed in any language! sorry for this!...
1
by: huzheng001 | last post by:
I have develop a on-line dictionary website, http://www.stardict.org I meet a problem: Here is two lines of js codes: document.getElementById("wordlist").innerHTML = "";...
4
by: jeepers | last post by:
Hi all, my problem is delete a line in a text file. the file contain -n line with user, userCode. i want to replace the line with user is egual at user, and/or insert new line but delete the...
17
by: vijayarl | last post by:
Hi All, Requirement: i have 4 excel files, each file will have this line 18/01/2008 20:00:00 5.31 5.48 5.33 i need to search for this line & extract this line then print it another...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.