Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. Imports System.IO
  2. Public Class Form1
  3. Dim OFDWTFlolPornoFTW As New OpenFileDialog 'Makes a new file dialog to select the txt.
  4. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  5. Try
  6. OFDWTFlolPornoFTW.ShowDialog() 'Shows the fucking dialog.
  7. TextBox1.Text = OFDWTFlolPornoFTW.FileName 'Makes the textboxs text the files loction that you selected, but coz you using console this will give you errors.
  8. Dim sReader As IO.StreamReader = New IO.StreamReader(OFDWTFlolPornoFTW.FileName) 'Makes a new streamreader duh.
  9. RichTextBox1.AppendText(sReader.ReadToEnd) 'Puts the text got from the selected txt into the richtextbox.
  10. Dim input As String = RichTextBox1.Text 'A string to contain are input value.
  11. Dim output As String = "" 'A string to containt are output.
  12. Dim CharStr As New Char 'gos tru each letter and reverves it>>
  13. For Each CharStr In input
  14. output = CharStr & output
  15. Next
  16. RichTextBox1.Text = output 'Gives richtextbox the output. WTF>? you don't understand this
  17. Catch ex As Exception
  18. End Try
  19. End Sub
  20.  
  21. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  22. Try
  23. If File.Exists(Application.StartupPath & "\Decoded.txt") Then
  24. File.Delete(Application.StartupPath & "\Decoded.txt") 'Deletes the "decoded.txt" if its aldready been saved.
  25. End If
  26. Dim FileWriter As StreamWriter 'Duh.
  27. FileWriter = New StreamWriter(Application.StartupPath & "\Decoded.txt", False) 'Tell filewriter where to save.
  28. FileWriter.Write(RichTextBox1.Text) 'writes text to it.
  29. FileWriter.Close() 'Duh
  30. MsgBox("Decoded") ' A message box saying decoded.
  31. Catch ex As Exception : End Try
  32. End Sub
  33. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement