Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click chk = 1 Try Dim TextBox1 As String : TextBox1 = "D:\temp.txt" Dim dialog As New OpenFileDialog() If DialogResult.OK = dialog.ShowDialog Then TextBox1 = dialog.FileName End If Dim lines() As String = System.IO.File.ReadAllLines(TextBox1) For Each line As String In lines RichTextBox1.AppendText(line) Next Dim dat(RichTextBox1.TextLength) As String For i As Integer = 0 To RichTextBox1.TextLength - 1 dat(i) = (RichTextBox1.Text(i) & RichTextBox1.Text(i + 1) & RichTextBox1.Text(i + 2)) i += 2 Next MessageBox.Show("Done") Catch ex As Exception MessageBox.Show(ex.Message, Nothing, MessageBoxButtons.OK, MessageBoxIcon.Error) End Try End Sub
lines
Length
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)