Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Source Codes For Beginners Pt.2
#1
Form2

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)
[Image: OGForumsbanner.png]
Reply


Messages In This Thread
Source Codes For Beginners Pt.2 - by SouR'D - 02-21-2010, 09:47 PM
RE: Source Codes For Beginners Pt.2 - by Danny - 02-23-2010, 08:29 PM
RE: Source Codes For Beginners Pt.2 - by SouR'D - 02-24-2010, 02:03 PM
RE: Source Codes For Beginners Pt.2 - by RaZoR03 - 04-18-2010, 12:42 AM
RE: Source Codes For Beginners Pt.2 - by trubufo - 04-28-2010, 04:25 PM
RE: Source Codes For Beginners Pt.2 - by Fragma - 05-03-2010, 05:18 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Source Codes For Beginners Pt.1 SouR'D 14 4,441 11-25-2012, 10:36 PM
Last Post: ƃu∀ ıʞƃu∀
  [Source ] Hemp Tycoon App [/Source] VB.net KoBE 8 9,748 03-05-2012, 10:30 PM
Last Post: SomeWhiteGuy?
  [Source]Sql Database Project [Source] Digital-Punk 0 1,439 10-16-2011, 07:01 AM
Last Post: Digital-Punk
  [Source]Batch to Exe converter[Source] Digital-Punk 6 2,982 10-15-2011, 03:00 AM
Last Post: Digital-Punk
  [Source]File Assembly changer Vb.Net[Source] Digital-Punk 0 3,102 10-13-2011, 06:35 PM
Last Post: Digital-Punk

Forum Jump:


Users browsing this thread: 1 Guest(s)