Source Codes For Beginners Pt.2 - SouR'D - 02-21-2010
Form2
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)
RE: Source Codes For Beginners Pt.2 - Danny - 02-23-2010
Nice codes I know most of these already but they are a quick guide.
RE: Source Codes For Beginners Pt.2 - pycomonkey - 02-23-2010
Thanks!!
-Pycomoneky
RE: Source Codes For Beginners Pt.2 - SouR'D - 02-24-2010
(02-23-2010, 08:33 PM)pycomonkey Wrote: Thanks!!
-Pycomoneky
No Problem Just here To share..LOL
RE: Source Codes For Beginners Pt.2 - RaZoR03 - 04-18-2010
Very nice share...
Thanks
RE: Source Codes For Beginners Pt.2 - trubufo - 04-28-2010
An auto typer is nice . Very nice share
RE: Source Codes For Beginners Pt.2 - Fragma - 05-03-2010
Pretty random share
Will probably help some beginners. Good work.
RE: Source Codes For Beginners Pt.2 - JesusOfSuburbia - 05-04-2010
Nice share man! Very usefull for beginners!
RE: Source Codes For Beginners Pt.2 - Th3 Jok3r - 05-06-2010
Thanx I like this one.
RE: Source Codes For Beginners Pt.2 - ƃu∀ ıʞƃu∀ - 11-25-2012
nice tut for beginner
thank you for sharing this
|