libdo

Untitled

Sep 21st, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Class Form1
  2.  
  3. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  4.  
  5. If TextBox1.Text.Contains("Virus") Then
  6. MsgBox(Vius Detected, MsgBoxStyle.Critical)
  7. Else
  8. MsgBox("No Virus Detected")
  9. End If
  10. End Sub
  11.  
  12. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  13. Dim alltext As String = "", lineoftext As String = ""
  14. OpenFileDialog1.Filter = "All Files | *.*"
  15. OpenFileDialog1.ShowDialog()
  16. If OpenFileDialog1.FileName <> "" Then
  17.  
  18. End If
  19. Try
  20. FileOpen(1, OpenFileDialog1.FileName, OpenMode.Input)
  21.  
  22. Do Until EOF(1)
  23. lineoftext = LineInput(1)
  24. alltext = alltext & lineoftext & vbCrLf
  25. Loop
  26. TextBox1.Text = alltext
  27. Catch
  28. Finally
  29. FileClose()
  30. End Try
  31. End Sub
Add Comment
Please, Sign In to add comment