TextBox1.Lines(1).ToStringbut i don't know how to use the value of
TextBox1.Lines(1).ToStringand "paste" it in example : the 2de line in txtbox5?
Please and thank you
Rudi




Posted 07 January 2013 - 03:43 AM
TextBox1.Lines(1).ToStringbut i don't know how to use the value of
TextBox1.Lines(1).ToStringand "paste" it in example : the 2de line in txtbox5?
Posted 07 January 2013 - 04:37 AM
Dim lineOfText as string = TextBox1.Lines(1).ToString
Posted 07 January 2013 - 05:32 AM
Textbox1.Line(1).Tostringto edit the 5th line in textbox5.
Textbox1.Lines(4) = Textbox1.Line(1).Tostring
Posted 07 January 2013 - 06:07 AM
For Each i In txt2.Lines
If i = 4 Then
txt2.Text = txt1.Lines.GetValue(1).ToString
End If
Next
Posted 07 January 2013 - 09:55 AM
Posted 07 January 2013 - 10:12 AM
Private Sub btnChange_Click(sender As System.Object, e As System.EventArgs) Handles btnChange.Click
' in this call, TxtBox1.Text is what we want to change
' 1, is the index of the line we want to change
' TextBox2.Lines(2).ToString is a line from another TextBox that we want to
' end up in TextBox1.Text
TextBox1.Text = changeline(1, TextBox1.Text, TextBox2.Lines(2).ToString)
End Sub
Private Function changeline(ByVal whichline As Integer, ByVal oldtext As String, ByVal changetext As String) As String
Dim tboxLines() As String
tboxLines = oldtext.Split(CChar(vbNewLine))
tboxLines(whichline) = changetext
Return Join(tboxLines, vbNewLine)
End Function
Posted 07 January 2013 - 09:47 PM
Posted 08 January 2013 - 12:40 PM
Knowledge needed, on 07 January 2013 - 10:47 PM, said:
TextBox1.Text = changeline(1, TextBox1.Text, TextBox2.Lines(2).ToString)
TextBox1.Text = changeline(5, TextBox1.Text, "This text will be placed in TextBox1, on the 6th line.")
fileContents = changeline(11, fileContents, Now())
|
|
Query failed: connection to localhost:3312 failed (errno=111, msg=Connection refused).
|
