Wednesday 15 February 2017

Extract Each Lines From Text Box VB.NET Source Code

Extract Each Lines From Text Box VB.NET Source Code


Source Code

Button 1 Click Event

 Dim loi As Integer = 1
        For Each strLine As String In TextBox1.Text.Split(vbNewLine)
            If loi = 1 Then
                MsgBox(strLine)
                loi = 0
            Else
                MsgBox(strLine.Remove(0, 1))
            End If
        Next
    End Sub

If Condition Used For Avoid Extra New Lines..

2 comments:

  1. How do I add a line from a textfile, into a textbox, one by one?

    ReplyDelete
  2. good work man but explain it please

    ReplyDelete