Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.IO
- Public Class Form1
- Dim OFDWTFlolPornoFTW As New OpenFileDialog 'Makes a new file dialog to select the txt.
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Try
- OFDWTFlolPornoFTW.ShowDialog() 'Shows the fucking dialog.
- TextBox1.Text = OFDWTFlolPornoFTW.FileName 'Makes the textboxs text the files loction that you selected, but coz you using console this will give you errors.
- Dim sReader As IO.StreamReader = New IO.StreamReader(OFDWTFlolPornoFTW.FileName) 'Makes a new streamreader duh.
- RichTextBox1.AppendText(sReader.ReadToEnd) 'Puts the text got from the selected txt into the richtextbox.
- Dim input As String = RichTextBox1.Text 'A string to contain are input value.
- Dim output As String = "" 'A string to containt are output.
- Dim CharStr As New Char 'gos tru each letter and reverves it>>
- For Each CharStr In input
- output = CharStr & output
- Next
- RichTextBox1.Text = output 'Gives richtextbox the output. WTF>? you don't understand this
- Catch ex As Exception
- End Try
- End Sub
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- Try
- If File.Exists(Application.StartupPath & "\Decoded.txt") Then
- File.Delete(Application.StartupPath & "\Decoded.txt") 'Deletes the "decoded.txt" if its aldready been saved.
- End If
- Dim FileWriter As StreamWriter 'Duh.
- FileWriter = New StreamWriter(Application.StartupPath & "\Decoded.txt", False) 'Tell filewriter where to save.
- FileWriter.Write(RichTextBox1.Text) 'writes text to it.
- FileWriter.Close() 'Duh
- MsgBox("Decoded") ' A message box saying decoded.
- Catch ex As Exception : End Try
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement