02-21-2010, 09:47 PM
Form2
Auto Typer
MD5 From File
Listbox Auto Scroll
Message box
Send Email
Code:
Form2.show
me.close
Auto Typer
Code:
Public Class Form1
Private Sub TextBox4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox4.TextChanged
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If CheckBox1.Checked = True Then
On Error Resume Next
SendKeys.Send(TextBox1.Text)
On Error Resume Next
SendKeys.Send("{Enter}")
End If
If CheckBox2.Checked = True Then
On Error Resume Next
SendKeys.Send(TextBox2.Text)
On Error Resume Next
SendKeys.Send("{Enter}")
End If
If CheckBox3.Checked = True Then
On Error Resume Next
SendKeys.Send(TextBox3.Text)
On Error Resume Next
SendKeys.Send("{Enter}")
End If
If CheckBox4.Checked = True Then
On Error Resume Next
SendKeys.Send(TextBox4.Text)
On Error Resume Next
SendKeys.Send("{Enter}")
End If
If CheckBox5.Checked = True Then
On Error Resume Next
SendKeys.Send(TextBox5.Text)
On Error Resume Next
SendKeys.Send("{Enter}")
End If
Timer1.Start()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Stop()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
End
End Sub
MD5 From File
Code:
Public Function MD5CalcFile(ByVal strPath As String) As String
Dim objReader As System.IO.Stream
Dim objMD5 As New System.Security.Cryptography.MD5CryptoServiceProvider
Dim arrHash() As Byte
' open file (as read-only)
objReader = New System.IO.FileStream(strPath, IO.FileMode.Open, IO.FileAccess.Read)
' hash contents of this stream
arrHash = objMD5.ComputeHash(objReader)
' thanks objects
objReader.Close()
objReader = Nothing
objMD5 = Nothing
' return formatted hash
Return ByteArrayToString(arrHash)
End Function
' utility function to convert a byte array into a hex string
Private Function ByteArrayToString(ByVal arrInput() As Byte) As String
Dim strOutput As New System.Text.StringBuilder(arrInput.Length)
For i As Integer = 0 To arrInput.Length - 1
strOutput.Append(arrInput(i).ToString("X2"))
Next
Return strOutput.ToString().ToLower
End Function
Listbox Auto Scroll
Code:
ListBox1.TopIndex = ListBox1.Items.Count - 1
Message box
Code:
MsgBox ("Message here", style.here, "Title here")
Send Email
Code:
Dim SetUPMAIL As New MailMessage()
Try
SetUPMAIL.From = New MailAddress("YOURGOOGLEEMAIL@googlemail.com")
SetUPMAIL.To.Add("YOUREMAIL@ANYHOST.COM")
SetUPMAIL.Subject = "Subject"
SetUPMAIL.Body = "Body"
Dim SMTP As New SmtpClient("smtp.googlemail.com" or "smtp.gmail.com")
SMTP.Port = 587
SMTP.EnableSsl = True
SMTP.Credentials = New System.Net.NetworkCredential("YOURGOOGLEEMAIL@googlemail.com", "GOOGLEMAILPASSWORD")
SMTP.Send(SetUPMAIL)