Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.IO
- Imports System.Text.RegularExpressions
- Public Class Form1
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- ' Call ShowDialog.
- Dim result As DialogResult = OpenFileDialog1.ShowDialog()
- ' Test result.
- If result = Windows.Forms.DialogResult.OK Then
- End If
- ' Get the file name for reference.
- Dim path As String = OpenFileDialog1.FileName
- Try
- Catch ex As Exception
- End Try
- ' Read text.
- Dim text As String = File.ReadAllText(path)
- ' Displays the folder path
- TextBox5.Text = path
- 'Displays the contents of the .TXT (I hid this tho)
- TextBox2.Text = text
- 'Declares contents as a string
- Dim strA1 As String = TextBox2.Text
- 'Splits the string we the / marks are
- Dim splitA1 As String() = strA1.Split("/")
- 'Displays the sections accordingly
- TextBox1.Text = splitA1(0).ToString()
- TextBox3.Text = splitA1(1).ToString()
- TextBox4.Text = splitA1(2).ToString()
- End Sub
- Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
- Me.Close()
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement