Click here to Skip to main content
15,905,508 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: write line through textwriter Pin
Xmen Real 26-Mar-07 5:52
professional Xmen Real 26-Mar-07 5:52 
GeneralRe: write line through textwriter Pin
Xmen Real 26-Mar-07 6:12
professional Xmen Real 26-Mar-07 6:12 
GeneralRe: write line through textwriter Pin
TwoFaced26-Mar-07 6:50
TwoFaced26-Mar-07 6:50 
GeneralRe: write line through textwriter Pin
Dave Kreskowiak26-Mar-07 7:05
mveDave Kreskowiak26-Mar-07 7:05 
GeneralRe: write line through textwriter Pin
Xmen Real 26-Mar-07 15:38
professional Xmen Real 26-Mar-07 15:38 
GeneralRe: write line through textwriter Pin
Dave Kreskowiak26-Mar-07 16:09
mveDave Kreskowiak26-Mar-07 16:09 
GeneralRe: write line through textwriter Pin
Xmen Real 26-Mar-07 16:38
professional Xmen Real 26-Mar-07 16:38 
GeneralRe: write line through textwriter Pin
TwoFaced26-Mar-07 20:35
TwoFaced26-Mar-07 20:35 
Richtextbox1.lines is an array. Richtextbox1.lines.length returns the number of lines in the richtextbox. However arrays start at zero. So to access the first element you would use Richtextbox1.lines(0). If there are 10 lines the 10th line would be Richtextbox1.lines(9). So to iterate over all the lines you go from 0 to 9 or 0 to length -1.

The code provided will do just what you want. All you need to do is make a small modification to add the value in the textbox.
Dim newText As New System.Text.StringBuilder
For x As Integer = 0 To RichTextBox1.Lines.Length - 1
    Dim val As Integer = Integer.Parse(RichTextBox1.Lines(x)) + Integer.Parse(TextBox1.Text)
    newText.AppendLine(val.ToString)
Next
RichTextBox1.Text = newText.ToString.Trim

GeneralRe: write line through textwriter Pin
Xmen Real 26-Mar-07 21:05
professional Xmen Real 26-Mar-07 21:05 
QuestionTry to check if textbox empty Pin
MAGICIANMERLIN25-Mar-07 12:34
MAGICIANMERLIN25-Mar-07 12:34 
AnswerRe: Try to check if textbox empty Pin
Christian Graus25-Mar-07 12:42
protectorChristian Graus25-Mar-07 12:42 
AnswerRe: Try to check if textbox empty Pin
MAGICIANMERLIN25-Mar-07 12:48
MAGICIANMERLIN25-Mar-07 12:48 
GeneralRe: Try to check if textbox empty Pin
Christian Graus25-Mar-07 12:51
protectorChristian Graus25-Mar-07 12:51 
QuestionMulti-Threading Pin
MatrixCoder25-Mar-07 10:57
MatrixCoder25-Mar-07 10:57 
AnswerRe: Multi-Threading Pin
Christian Graus25-Mar-07 11:59
protectorChristian Graus25-Mar-07 11:59 
GeneralRe: Multi-Threading Pin
MatrixCoder25-Mar-07 13:42
MatrixCoder25-Mar-07 13:42 
GeneralRe: Multi-Threading Pin
Christian Graus25-Mar-07 14:10
protectorChristian Graus25-Mar-07 14:10 
GeneralRe: Multi-Threading Pin
MatrixCoder25-Mar-07 15:26
MatrixCoder25-Mar-07 15:26 
GeneralRe: Multi-Threading Pin
Christian Graus25-Mar-07 16:46
protectorChristian Graus25-Mar-07 16:46 
GeneralRe: Multi-Threading Pin
MatrixCoder26-Mar-07 10:26
MatrixCoder26-Mar-07 10:26 
Questionstuck with WSDL in VB.net win forms Pin
pabloraul25-Mar-07 9:36
pabloraul25-Mar-07 9:36 
AnswerRe: stuck with WSDL in VB.net win forms Pin
Christian Graus25-Mar-07 10:20
protectorChristian Graus25-Mar-07 10:20 
GeneralRe: stuck with WSDL in VB.net win forms Pin
pabloraul25-Mar-07 10:23
pabloraul25-Mar-07 10:23 
GeneralRe: stuck with WSDL in VB.net win forms Pin
Christian Graus25-Mar-07 10:39
protectorChristian Graus25-Mar-07 10:39 
GeneralRe: stuck with WSDL in VB.net win forms [modified] Pin
pabloraul25-Mar-07 10:54
pabloraul25-Mar-07 10:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.