Advertisement
King_96

getInfo sorter app

Feb 11th, 2015
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.25 KB | None | 0 0
  1. Imports System.IO
  2. Imports System.Text.RegularExpressions
  3.  
  4. Public Class Form1
  5.  
  6.     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  7.         ' Call ShowDialog.
  8.         Dim result As DialogResult = OpenFileDialog1.ShowDialog()
  9.         ' Test result.
  10.         If result = Windows.Forms.DialogResult.OK Then
  11.         End If
  12.  
  13.         ' Get the file name for reference.
  14.         Dim path As String = OpenFileDialog1.FileName
  15.         Try
  16.         Catch ex As Exception
  17.         End Try
  18.         ' Read text.
  19.         Dim text As String = File.ReadAllText(path)
  20.         ' Displays the folder path
  21.         TextBox5.Text = path
  22.         'Displays the contents of the .TXT (I hid this tho)
  23.         TextBox2.Text = text
  24.         'Declares contents as a string
  25.         Dim strA1 As String = TextBox2.Text
  26.         'Splits the string we the / marks are
  27.         Dim splitA1 As String() = strA1.Split("/")
  28.         'Displays the sections accordingly
  29.         TextBox1.Text = splitA1(0).ToString()
  30.         TextBox3.Text = splitA1(1).ToString()
  31.         TextBox4.Text = splitA1(2).ToString()
  32.  
  33.  
  34.     End Sub
  35.  
  36.     Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
  37.         Me.Close()
  38.     End Sub
  39.  
  40.    
  41. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement