Snippets Vault

Posts 91–105 of 113 · Page 7 of 8
Some Useful .NET Codes
Here will be some useful .NET tutorials for you programs. Please post what you think are some useful codes that will help people in .NET. I will start off :

 
Moving A Border-less form
Code:
    Dim Moveable As Boolean
    Dim LastPos As Point
    Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
        Moveable = True
        LastPos = Cursor.Position - Me.Location
    End Sub
    Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
        If Moveable Then
            Me.Location = Cursor.Position - LastPos
        End If
    End Sub
    Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseUp
        Moveable = False
    End Sub
This will move the form when you drag PictureBox1, you can change what control to move it with, replace all "PictureBox1"s with your desired control (eg Label1, Form1, etc). You can also make it to drag other controls, simply replace all "Me.Location" with "YOUR CONTROL.Location"


 
Change Location X/Y

Code:
PictureBox1.Location = New Point(PictureBox1.Location.X = 15, PictureBox1.Location.Y = 91)
You can also loop this so that it will slide across your screen until it gets to the right location;
Code:
If Picturebox1.Location.Y = 30 Then
    Do Until PictureBox1.Location.Y = 15
        PictureBox1.Location = New Point(PictureBox1.Location.X, PictureBox1.Location.Y -1)
    Loop
End If
And then reverse it, very easy for slide-down control panels etc.

Note: Im pretty sure you need to have both .X and .Y, if you dont want to change one of them just dont put any numbers.


 
Search For Program

Code:
        myProcesses = Process.GetProcessesByName("YOUR PROCESS") 'Do not include the extension (.exe)
        If myProcesses.Count > 0 Then
            MsgBox ("Found!")
        Else
            MsgBox ("Not Found!")
        End If
I like to put this in a timer and if it finds the program it changes a labels text to green, and says "Found!" else the text is red and says "Not Found!". Up to you though.


Thread Rules:
- No double posts
- Do not swear/use Inappropriate language please
- Only post codes that are not harmful to users computers
- No outside linking, replace websites etc with "You text here"
- The usual Forum/Thread rules
- If you use a code from this thread, credit the poster of that code!


Sticky?
Password Generator "EASY"
This is a "EASY" Tutorial, Meaning Ill let you make everything and then copy paste the code. This is literally for all you people who only know the basics of visual basic. Something i wrote myself, didn't take too long, like around 10 minuets cause I thought u could use OR's And i got a crap load of errors. Please Make this better and do everything you want with it! IT WAS EASY TO MAKE AND YOU DON'T HAVE TO ADD ME TO ANY CREDITS

Things Needed :
1xTextbox "Text will be auto"
1xButton "Name = Generate Password"
10xTimer

Double Click form and paste this Code"

Code:
Public Class Form1
    Dim mainbase As Integer = 0
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        TextBox1.Text = ""
        If mainbase = 0 Then
            TextBox1.Text = TextBox1.Text + ""
        ElseIf mainbase = 1 Then
            TextBox1.Text = TextBox1.Text + "A"
        ElseIf mainbase = 2 Then
            TextBox1.Text = TextBox1.Text + "B"
        ElseIf mainbase = 3 Then
            TextBox1.Text = TextBox1.Text + "C"
        ElseIf mainbase = 4 Then
            TextBox1.Text = TextBox1.Text + "D"
        ElseIf mainbase = 5 Then
            TextBox1.Text = TextBox1.Text + "E"
        ElseIf mainbase = 6 Then
            TextBox1.Text = TextBox1.Text + "F"
        ElseIf mainbase = 7 Then
            TextBox1.Text = TextBox1.Text + "G"
        ElseIf mainbase = 8 Then
            TextBox1.Text = TextBox1.Text + "H"
        ElseIf mainbase = 9 Then
            TextBox1.Text = TextBox1.Text + "I"
        ElseIf mainbase = 10 Then
            TextBox1.Text = TextBox1.Text + "J"
        ElseIf mainbase = 11 Then
            TextBox1.Text = TextBox1.Text + "K"
        ElseIf mainbase = 12 Then
            TextBox1.Text = TextBox1.Text + "L"
        ElseIf mainbase = 13 Then
            TextBox1.Text = TextBox1.Text + "M"
        ElseIf mainbase = 14 Then
            TextBox1.Text = TextBox1.Text + "N"
        ElseIf mainbase = 15 Then
            TextBox1.Text = TextBox1.Text + "O"
        ElseIf mainbase = 16 Then
            TextBox1.Text = TextBox1.Text + "P"
        ElseIf mainbase = 17 Then
            TextBox1.Text = TextBox1.Text + "Q"
        ElseIf mainbase = 18 Then
            TextBox1.Text = TextBox1.Text + "R"
        ElseIf mainbase = 19 Then
            TextBox1.Text = TextBox1.Text + "S"
        ElseIf mainbase = 20 Then
            TextBox1.Text = TextBox1.Text + "T"
        ElseIf mainbase = 21 Then
            TextBox1.Text = TextBox1.Text + "U"
        ElseIf mainbase = 22 Then
            TextBox1.Text = TextBox1.Text + "V"
        ElseIf mainbase = 23 Then
            TextBox1.Text = TextBox1.Text + "W"
        ElseIf mainbase = 24 Then
            TextBox1.Text = TextBox1.Text + "X"
        ElseIf mainbase = 25 Then
            TextBox1.Text = TextBox1.Text + "Y"
        ElseIf mainbase = 26 Then
            TextBox1.Text = TextBox1.Text + "Z"
        End If
        Timer3.Start()
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        mainbase = mainbase + 1
    End Sub

    Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
        If mainbase = 26 Then
            mainbase = mainbase - 26
        End If
    End Sub

    Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
        If mainbase = 0 Then
            TextBox1.Text = TextBox1.Text + ""
        ElseIf mainbase = 1 Then
            TextBox1.Text = TextBox1.Text + "A"
        ElseIf mainbase = 2 Then
            TextBox1.Text = TextBox1.Text + "B"
        ElseIf mainbase = 3 Then
            TextBox1.Text = TextBox1.Text + "C"
        ElseIf mainbase = 4 Then
            TextBox1.Text = TextBox1.Text + "D"
        ElseIf mainbase = 5 Then
            TextBox1.Text = TextBox1.Text + "E"
        ElseIf mainbase = 6 Then
            TextBox1.Text = TextBox1.Text + "F"
        ElseIf mainbase = 7 Then
            TextBox1.Text = TextBox1.Text + "G"
        ElseIf mainbase = 8 Then
            TextBox1.Text = TextBox1.Text + "H"
        ElseIf mainbase = 9 Then
            TextBox1.Text = TextBox1.Text + "I"
        ElseIf mainbase = 10 Then
            TextBox1.Text = TextBox1.Text + "J"
        ElseIf mainbase = 11 Then
            TextBox1.Text = TextBox1.Text + "K"
        ElseIf mainbase = 12 Then
            TextBox1.Text = TextBox1.Text + "L"
        ElseIf mainbase = 13 Then
            TextBox1.Text = TextBox1.Text + "M"
        ElseIf mainbase = 14 Then
            TextBox1.Text = TextBox1.Text + "N"
        ElseIf mainbase = 15 Then
            TextBox1.Text = TextBox1.Text + "O"
        ElseIf mainbase = 16 Then
            TextBox1.Text = TextBox1.Text + "P"
        ElseIf mainbase = 17 Then
            TextBox1.Text = TextBox1.Text + "Q"
        ElseIf mainbase = 18 Then
            TextBox1.Text = TextBox1.Text + "R"
        ElseIf mainbase = 19 Then
            TextBox1.Text = TextBox1.Text + "S"
        ElseIf mainbase = 20 Then
            TextBox1.Text = TextBox1.Text + "T"
        ElseIf mainbase = 21 Then
            TextBox1.Text = TextBox1.Text + "U"
        ElseIf mainbase = 22 Then
            TextBox1.Text = TextBox1.Text + "V"
        ElseIf mainbase = 23 Then
            TextBox1.Text = TextBox1.Text + "W"
        ElseIf mainbase = 24 Then
            TextBox1.Text = TextBox1.Text + "X"
        ElseIf mainbase = 25 Then
            TextBox1.Text = TextBox1.Text + "Y"
        ElseIf mainbase = 26 Then
            TextBox1.Text = TextBox1.Text + "Z"
        End If

        Timer4.Start()
        Timer3.Stop()
    End Sub

    Private Sub Timer4_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer4.Tick
        If mainbase = 0 Then
            TextBox1.Text = TextBox1.Text + ""
        ElseIf mainbase = 1 Then
            TextBox1.Text = TextBox1.Text + "A"
        ElseIf mainbase = 2 Then
            TextBox1.Text = TextBox1.Text + "B"
        ElseIf mainbase = 3 Then
            TextBox1.Text = TextBox1.Text + "C"
        ElseIf mainbase = 4 Then
            TextBox1.Text = TextBox1.Text + "D"
        ElseIf mainbase = 5 Then
            TextBox1.Text = TextBox1.Text + "E"
        ElseIf mainbase = 6 Then
            TextBox1.Text = TextBox1.Text + "F"
        ElseIf mainbase = 7 Then
            TextBox1.Text = TextBox1.Text + "G"
        ElseIf mainbase = 8 Then
            TextBox1.Text = TextBox1.Text + "H"
        ElseIf mainbase = 9 Then
            TextBox1.Text = TextBox1.Text + "I"
        ElseIf mainbase = 10 Then
            TextBox1.Text = TextBox1.Text + "J"
        ElseIf mainbase = 11 Then
            TextBox1.Text = TextBox1.Text + "K"
        ElseIf mainbase = 12 Then
            TextBox1.Text = TextBox1.Text + "L"
        ElseIf mainbase = 13 Then
            TextBox1.Text = TextBox1.Text + "M"
        ElseIf mainbase = 14 Then
            TextBox1.Text = TextBox1.Text + "N"
        ElseIf mainbase = 15 Then
            TextBox1.Text = TextBox1.Text + "O"
        ElseIf mainbase = 16 Then
            TextBox1.Text = TextBox1.Text + "P"
        ElseIf mainbase = 17 Then
            TextBox1.Text = TextBox1.Text + "Q"
        ElseIf mainbase = 18 Then
            TextBox1.Text = TextBox1.Text + "R"
        ElseIf mainbase = 19 Then
            TextBox1.Text = TextBox1.Text + "S"
        ElseIf mainbase = 20 Then
            TextBox1.Text = TextBox1.Text + "T"
        ElseIf mainbase = 21 Then
            TextBox1.Text = TextBox1.Text + "U"
        ElseIf mainbase = 22 Then
            TextBox1.Text = TextBox1.Text + "V"
        ElseIf mainbase = 23 Then
            TextBox1.Text = TextBox1.Text + "W"
        ElseIf mainbase = 24 Then
            TextBox1.Text = TextBox1.Text + "X"
        ElseIf mainbase = 25 Then
            TextBox1.Text = TextBox1.Text + "Y"
        ElseIf mainbase = 26 Then
            TextBox1.Text = TextBox1.Text + "Z"
        End If
        Timer5.Start()
        Timer4.Stop()
    End Sub

    Private Sub Timer5_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer5.Tick
        If mainbase = 0 Then
            TextBox1.Text = TextBox1.Text + ""
        ElseIf mainbase = 1 Then
            TextBox1.Text = TextBox1.Text + "A"
        ElseIf mainbase = 2 Then
            TextBox1.Text = TextBox1.Text + "B"
        ElseIf mainbase = 3 Then
            TextBox1.Text = TextBox1.Text + "C"
        ElseIf mainbase = 4 Then
            TextBox1.Text = TextBox1.Text + "D"
        ElseIf mainbase = 5 Then
            TextBox1.Text = TextBox1.Text + "E"
        ElseIf mainbase = 6 Then
            TextBox1.Text = TextBox1.Text + "F"
        ElseIf mainbase = 7 Then
            TextBox1.Text = TextBox1.Text + "G"
        ElseIf mainbase = 8 Then
            TextBox1.Text = TextBox1.Text + "H"
        ElseIf mainbase = 9 Then
            TextBox1.Text = TextBox1.Text + "I"
        ElseIf mainbase = 10 Then
            TextBox1.Text = TextBox1.Text + "J"
        ElseIf mainbase = 11 Then
            TextBox1.Text = TextBox1.Text + "K"
        ElseIf mainbase = 12 Then
            TextBox1.Text = TextBox1.Text + "L"
        ElseIf mainbase = 13 Then
            TextBox1.Text = TextBox1.Text + "M"
        ElseIf mainbase = 14 Then
            TextBox1.Text = TextBox1.Text + "N"
        ElseIf mainbase = 15 Then
            TextBox1.Text = TextBox1.Text + "O"
        ElseIf mainbase = 16 Then
            TextBox1.Text = TextBox1.Text + "P"
        ElseIf mainbase = 17 Then
            TextBox1.Text = TextBox1.Text + "Q"
        ElseIf mainbase = 18 Then
            TextBox1.Text = TextBox1.Text + "R"
        ElseIf mainbase = 19 Then
            TextBox1.Text = TextBox1.Text + "S"
        ElseIf mainbase = 20 Then
            TextBox1.Text = TextBox1.Text + "T"
        ElseIf mainbase = 21 Then
            TextBox1.Text = TextBox1.Text + "U"
        ElseIf mainbase = 22 Then
            TextBox1.Text = TextBox1.Text + "V"
        ElseIf mainbase = 23 Then
            TextBox1.Text = TextBox1.Text + "W"
        ElseIf mainbase = 24 Then
            TextBox1.Text = TextBox1.Text + "X"
        ElseIf mainbase = 25 Then
            TextBox1.Text = TextBox1.Text + "Y"
        ElseIf mainbase = 26 Then
            TextBox1.Text = TextBox1.Text + "Z"
        End If
        Timer6.Start()
        Timer5.Stop()
    End Sub

    Private Sub Timer6_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer6.Tick
        If mainbase = 0 Then
            TextBox1.Text = TextBox1.Text + ""
        ElseIf mainbase = 1 Then
            TextBox1.Text = TextBox1.Text + "A"
        ElseIf mainbase = 2 Then
            TextBox1.Text = TextBox1.Text + "B"
        ElseIf mainbase = 3 Then
            TextBox1.Text = TextBox1.Text + "C"
        ElseIf mainbase = 4 Then
            TextBox1.Text = TextBox1.Text + "D"
        ElseIf mainbase = 5 Then
            TextBox1.Text = TextBox1.Text + "E"
        ElseIf mainbase = 6 Then
            TextBox1.Text = TextBox1.Text + "F"
        ElseIf mainbase = 7 Then
            TextBox1.Text = TextBox1.Text + "G"
        ElseIf mainbase = 8 Then
            TextBox1.Text = TextBox1.Text + "H"
        ElseIf mainbase = 9 Then
            TextBox1.Text = TextBox1.Text + "I"
        ElseIf mainbase = 10 Then
            TextBox1.Text = TextBox1.Text + "J"
        ElseIf mainbase = 11 Then
            TextBox1.Text = TextBox1.Text + "K"
        ElseIf mainbase = 12 Then
            TextBox1.Text = TextBox1.Text + "L"
        ElseIf mainbase = 13 Then
            TextBox1.Text = TextBox1.Text + "M"
        ElseIf mainbase = 14 Then
            TextBox1.Text = TextBox1.Text + "N"
        ElseIf mainbase = 15 Then
            TextBox1.Text = TextBox1.Text + "O"
        ElseIf mainbase = 16 Then
            TextBox1.Text = TextBox1.Text + "P"
        ElseIf mainbase = 17 Then
            TextBox1.Text = TextBox1.Text + "Q"
        ElseIf mainbase = 18 Then
            TextBox1.Text = TextBox1.Text + "R"
        ElseIf mainbase = 19 Then
            TextBox1.Text = TextBox1.Text + "S"
        ElseIf mainbase = 20 Then
            TextBox1.Text = TextBox1.Text + "T"
        ElseIf mainbase = 21 Then
            TextBox1.Text = TextBox1.Text + "U"
        ElseIf mainbase = 22 Then
            TextBox1.Text = TextBox1.Text + "V"
        ElseIf mainbase = 23 Then
            TextBox1.Text = TextBox1.Text + "W"
        ElseIf mainbase = 24 Then
            TextBox1.Text = TextBox1.Text + "X"
        ElseIf mainbase = 25 Then
            TextBox1.Text = TextBox1.Text + "Y"
        ElseIf mainbase = 26 Then
            TextBox1.Text = TextBox1.Text + "Z"
        End If
        Timer7.Start()
        Timer6.Stop()
    End Sub

    Private Sub Timer7_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer7.Tick
        If mainbase = 0 Then
            TextBox1.Text = TextBox1.Text + ""
        ElseIf mainbase = 1 Then
            TextBox1.Text = TextBox1.Text + "1"
        ElseIf mainbase = 2 Then
            TextBox1.Text = TextBox1.Text + "2"
        ElseIf mainbase = 3 Then
            TextBox1.Text = TextBox1.Text + "3"
        ElseIf mainbase = 4 Then
            TextBox1.Text = TextBox1.Text + "4"
        ElseIf mainbase = 5 Then
            TextBox1.Text = TextBox1.Text + "5"
        ElseIf mainbase = 6 Then
            TextBox1.Text = TextBox1.Text + "6"
        ElseIf mainbase = 7 Then
            TextBox1.Text = TextBox1.Text + "7"
        ElseIf mainbase = 8 Then
            TextBox1.Text = TextBox1.Text + "8"
        ElseIf mainbase = 9 Then
            TextBox1.Text = TextBox1.Text + "9"
        ElseIf mainbase = 10 Then
            TextBox1.Text = TextBox1.Text + "10"
        ElseIf mainbase = 11 Then
            TextBox1.Text = TextBox1.Text + "11"
        ElseIf mainbase = 12 Then
            TextBox1.Text = TextBox1.Text + "12"
        ElseIf mainbase = 13 Then
            TextBox1.Text = TextBox1.Text + "13"
        ElseIf mainbase = 14 Then
            TextBox1.Text = TextBox1.Text + "14"
        ElseIf mainbase = 15 Then
            TextBox1.Text = TextBox1.Text + "15"
        ElseIf mainbase = 16 Then
            TextBox1.Text = TextBox1.Text + "16"
        ElseIf mainbase = 17 Then
            TextBox1.Text = TextBox1.Text + "17"
        ElseIf mainbase = 18 Then
            TextBox1.Text = TextBox1.Text + "18"
        ElseIf mainbase = 19 Then
            TextBox1.Text = TextBox1.Text + "19"
        ElseIf mainbase = 20 Then
            TextBox1.Text = TextBox1.Text + "20"
        ElseIf mainbase = 21 Then
            TextBox1.Text = TextBox1.Text + "21"
        ElseIf mainbase = 22 Then
            TextBox1.Text = TextBox1.Text + "22"
        ElseIf mainbase = 23 Then
            TextBox1.Text = TextBox1.Text + "23"
        ElseIf mainbase = 24 Then
            TextBox1.Text = TextBox1.Text + "24"
        ElseIf mainbase = 25 Then
            TextBox1.Text = TextBox1.Text + "25"
        ElseIf mainbase = 26 Then
            TextBox1.Text = TextBox1.Text + "26"
        End If
        Timer8.Start()
        Timer7.Stop()
    End Sub

    Private Sub Timer8_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer8.Tick
        If mainbase = 0 Then
            TextBox1.Text = TextBox1.Text + ""
        ElseIf mainbase = 1 Then
            TextBox1.Text = TextBox1.Text + "1"
        ElseIf mainbase = 2 Then
            TextBox1.Text = TextBox1.Text + "2"
        ElseIf mainbase = 3 Then
            TextBox1.Text = TextBox1.Text + "3"
        ElseIf mainbase = 4 Then
            TextBox1.Text = TextBox1.Text + "4"
        ElseIf mainbase = 5 Then
            TextBox1.Text = TextBox1.Text + "5"
        ElseIf mainbase = 6 Then
            TextBox1.Text = TextBox1.Text + "6"
        ElseIf mainbase = 7 Then
            TextBox1.Text = TextBox1.Text + "7"
        ElseIf mainbase = 8 Then
            TextBox1.Text = TextBox1.Text + "8"
        ElseIf mainbase = 9 Then
            TextBox1.Text = TextBox1.Text + "9"
        ElseIf mainbase = 10 Then
            TextBox1.Text = TextBox1.Text + "10"
        ElseIf mainbase = 11 Then
            TextBox1.Text = TextBox1.Text + "11"
        ElseIf mainbase = 12 Then
            TextBox1.Text = TextBox1.Text + "12"
        ElseIf mainbase = 13 Then
            TextBox1.Text = TextBox1.Text + "13"
        ElseIf mainbase = 14 Then
            TextBox1.Text = TextBox1.Text + "14"
        ElseIf mainbase = 15 Then
            TextBox1.Text = TextBox1.Text + "15"
        ElseIf mainbase = 16 Then
            TextBox1.Text = TextBox1.Text + "16"
        ElseIf mainbase = 17 Then
            TextBox1.Text = TextBox1.Text + "17"
        ElseIf mainbase = 18 Then
            TextBox1.Text = TextBox1.Text + "18"
        ElseIf mainbase = 19 Then
            TextBox1.Text = TextBox1.Text + "19"
        ElseIf mainbase = 20 Then
            TextBox1.Text = TextBox1.Text + "20"
        ElseIf mainbase = 21 Then
            TextBox1.Text = TextBox1.Text + "21"
        ElseIf mainbase = 22 Then
            TextBox1.Text = TextBox1.Text + "22"
        ElseIf mainbase = 23 Then
            TextBox1.Text = TextBox1.Text + "23"
        ElseIf mainbase = 24 Then
            TextBox1.Text = TextBox1.Text + "24"
        ElseIf mainbase = 25 Then
            TextBox1.Text = TextBox1.Text + "25"
        ElseIf mainbase = 26 Then
            TextBox1.Text = TextBox1.Text + "26"
        End If

        Timer9.Start()
        Timer8.Stop()
    End Sub

    Private Sub Timer9_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer9.Tick
        If mainbase = 0 Then
            TextBox1.Text = TextBox1.Text + ""
        ElseIf mainbase = 1 Then
            TextBox1.Text = TextBox1.Text + "1"
        ElseIf mainbase = 2 Then
            TextBox1.Text = TextBox1.Text + "2"
        ElseIf mainbase = 3 Then
            TextBox1.Text = TextBox1.Text + "3"
        ElseIf mainbase = 4 Then
            TextBox1.Text = TextBox1.Text + "4"
        ElseIf mainbase = 5 Then
            TextBox1.Text = TextBox1.Text + "5"
        ElseIf mainbase = 6 Then
            TextBox1.Text = TextBox1.Text + "6"
        ElseIf mainbase = 7 Then
            TextBox1.Text = TextBox1.Text + "7"
        ElseIf mainbase = 8 Then
            TextBox1.Text = TextBox1.Text + "8"
        ElseIf mainbase = 9 Then
            TextBox1.Text = TextBox1.Text + "9"
        ElseIf mainbase = 10 Then
            TextBox1.Text = TextBox1.Text + "10"
        ElseIf mainbase = 11 Then
            TextBox1.Text = TextBox1.Text + "11"
        ElseIf mainbase = 12 Then
            TextBox1.Text = TextBox1.Text + "12"
        ElseIf mainbase = 13 Then
            TextBox1.Text = TextBox1.Text + "13"
        ElseIf mainbase = 14 Then
            TextBox1.Text = TextBox1.Text + "14"
        ElseIf mainbase = 15 Then
            TextBox1.Text = TextBox1.Text + "15"
        ElseIf mainbase = 16 Then
            TextBox1.Text = TextBox1.Text + "16"
        ElseIf mainbase = 17 Then
            TextBox1.Text = TextBox1.Text + "17"
        ElseIf mainbase = 18 Then
            TextBox1.Text = TextBox1.Text + "18"
        ElseIf mainbase = 19 Then
            TextBox1.Text = TextBox1.Text + "19"
        ElseIf mainbase = 20 Then
            TextBox1.Text = TextBox1.Text + "20"
        ElseIf mainbase = 21 Then
            TextBox1.Text = TextBox1.Text + "21"
        ElseIf mainbase = 22 Then
            TextBox1.Text = TextBox1.Text + "22"
        ElseIf mainbase = 23 Then
            TextBox1.Text = TextBox1.Text + "23"
        ElseIf mainbase = 24 Then
            TextBox1.Text = TextBox1.Text + "24"
        ElseIf mainbase = 25 Then
            TextBox1.Text = TextBox1.Text + "25"
        ElseIf mainbase = 26 Then
            TextBox1.Text = TextBox1.Text + "26"
        End If

        Timer10.Start()
        Timer9.Stop()
    End Sub

    Private Sub Timer10_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer10.Tick
        If mainbase = 0 Then
            TextBox1.Text = TextBox1.Text + ""
        ElseIf mainbase = 1 Then
            TextBox1.Text = TextBox1.Text + "A"
        ElseIf mainbase = 2 Then
            TextBox1.Text = TextBox1.Text + "B"
        ElseIf mainbase = 3 Then
            TextBox1.Text = TextBox1.Text + "C"
        ElseIf mainbase = 4 Then
            TextBox1.Text = TextBox1.Text + "D"
        ElseIf mainbase = 5 Then
            TextBox1.Text = TextBox1.Text + "E"
        ElseIf mainbase = 6 Then
            TextBox1.Text = TextBox1.Text + "F"
        ElseIf mainbase = 7 Then
            TextBox1.Text = TextBox1.Text + "G"
        ElseIf mainbase = 8 Then
            TextBox1.Text = TextBox1.Text + "H"
        ElseIf mainbase = 9 Then
            TextBox1.Text = TextBox1.Text + "I"
        ElseIf mainbase = 10 Then
            TextBox1.Text = TextBox1.Text + "J"
        ElseIf mainbase = 11 Then
            TextBox1.Text = TextBox1.Text + "K"
        ElseIf mainbase = 12 Then
            TextBox1.Text = TextBox1.Text + "L"
        ElseIf mainbase = 13 Then
            TextBox1.Text = TextBox1.Text + "M"
        ElseIf mainbase = 14 Then
            TextBox1.Text = TextBox1.Text + "N"
        ElseIf mainbase = 15 Then
            TextBox1.Text = TextBox1.Text + "O"
        ElseIf mainbase = 16 Then
            TextBox1.Text = TextBox1.Text + "P"
        ElseIf mainbase = 17 Then
            TextBox1.Text = TextBox1.Text + "Q"
        ElseIf mainbase = 18 Then
            TextBox1.Text = TextBox1.Text + "R"
        ElseIf mainbase = 19 Then
            TextBox1.Text = TextBox1.Text + "S"
        ElseIf mainbase = 20 Then
            TextBox1.Text = TextBox1.Text + "T"
        ElseIf mainbase = 21 Then
            TextBox1.Text = TextBox1.Text + "U"
        ElseIf mainbase = 22 Then
            TextBox1.Text = TextBox1.Text + "V"
        ElseIf mainbase = 23 Then
            TextBox1.Text = TextBox1.Text + "W"
        ElseIf mainbase = 24 Then
            TextBox1.Text = TextBox1.Text + "X"
        ElseIf mainbase = 25 Then
            TextBox1.Text = TextBox1.Text + "Y"
        ElseIf mainbase = 26 Then
            TextBox1.Text = TextBox1.Text + "Z"
        End If

        Timer10.Stop()
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        TextBox1.Text = "Credits : Lucasheer715 - MPGH"
        Timer1.Interval = 10
        Timer2.Interval = 1
        Timer3.Interval = 100
        Timer4.Interval = 100
        Timer5.Interval = 100
        Timer6.Interval = 100
        Timer7.Interval = 100
        Timer8.Interval = 100
        Timer9.Interval = 100
        Timer10.Interval = 100
        Timer1.Enabled = True
        Timer2.Enabled = True
        Timer3.Enabled = False
        Timer4.Enabled = False
        Timer5.Enabled = False
        Timer6.Enabled = False
        Timer7.Enabled = False
        Timer8.Enabled = False
        Timer9.Enabled = False
        Timer10.Enabled = False
    End Sub
End Class
If this Helped please click the "Thanks" button and i will do more in the future.

---------- Post added at 09:23 PM ---------- Previous post was at 09:22 PM ----------

God, I know its a long code but it was the shortest way to do it Hope you like
This the bootlegged way of doing it
I know, there's always harder tutorials but i feel that this way is the easiest lol like makeing 2 timers and 1 will generate numbers and the other will turn it off lol
You can use flame's tutorial if you wouldn't wanna use this one.
Thats ok. I'll make something on my own if I needed something like this
Quote Originally Posted by lucasheer715 View Post
This is a "EASY" Tutorial, Meaning Ill let you make everything and then copy paste the code. This is literally for all you people who only know the basics of visual basic. Something i wrote myself, didn't take too long, like around 10 minuets cause I thought u could use OR's And i got a crap load of errors. Please Make this better and do everything you want with it! IT WAS EASY TO MAKE AND YOU DON'T HAVE TO ADD ME TO ANY CREDITS

Things Needed :
1xTextbox "Text will be auto"
1xButton "Name = Generate Password"
10xTimer

Double Click form and paste this Code"

Code:
Public Class Form1
    Dim mainbase As Integer = 0
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        TextBox1.Text = ""
        If mainbase = 0 Then
            TextBox1.Text = TextBox1.Text + ""
        ElseIf mainbase = 1 Then
            TextBox1.Text = TextBox1.Text + "A"
        ElseIf mainbase = 2 Then
            TextBox1.Text = TextBox1.Text + "B"
        ElseIf mainbase = 3 Then
            TextBox1.Text = TextBox1.Text + "C"
        ElseIf mainbase = 4 Then
            TextBox1.Text = TextBox1.Text + "D"
        ElseIf mainbase = 5 Then
            TextBox1.Text = TextBox1.Text + "E"
        ElseIf mainbase = 6 Then
            TextBox1.Text = TextBox1.Text + "F"
        ElseIf mainbase = 7 Then
            TextBox1.Text = TextBox1.Text + "G"
        ElseIf mainbase = 8 Then
            TextBox1.Text = TextBox1.Text + "H"
        ElseIf mainbase = 9 Then
            TextBox1.Text = TextBox1.Text + "I"
        ElseIf mainbase = 10 Then
            TextBox1.Text = TextBox1.Text + "J"
        ElseIf mainbase = 11 Then
            TextBox1.Text = TextBox1.Text + "K"
        ElseIf mainbase = 12 Then
            TextBox1.Text = TextBox1.Text + "L"
        ElseIf mainbase = 13 Then
            TextBox1.Text = TextBox1.Text + "M"
        ElseIf mainbase = 14 Then
            TextBox1.Text = TextBox1.Text + "N"
        ElseIf mainbase = 15 Then
            TextBox1.Text = TextBox1.Text + "O"
        ElseIf mainbase = 16 Then
            TextBox1.Text = TextBox1.Text + "P"
        ElseIf mainbase = 17 Then
            TextBox1.Text = TextBox1.Text + "Q"
        ElseIf mainbase = 18 Then
            TextBox1.Text = TextBox1.Text + "R"
        ElseIf mainbase = 19 Then
            TextBox1.Text = TextBox1.Text + "S"
        ElseIf mainbase = 20 Then
            TextBox1.Text = TextBox1.Text + "T"
        ElseIf mainbase = 21 Then
            TextBox1.Text = TextBox1.Text + "U"
        ElseIf mainbase = 22 Then
            TextBox1.Text = TextBox1.Text + "V"
        ElseIf mainbase = 23 Then
            TextBox1.Text = TextBox1.Text + "W"
        ElseIf mainbase = 24 Then
            TextBox1.Text = TextBox1.Text + "X"
        ElseIf mainbase = 25 Then
            TextBox1.Text = TextBox1.Text + "Y"
        ElseIf mainbase = 26 Then
            TextBox1.Text = TextBox1.Text + "Z"
        End If
        Timer3.Start()
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        mainbase = mainbase + 1
    End Sub

    Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
        If mainbase = 26 Then
            mainbase = mainbase - 26
        End If
    End Sub

    Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
        If mainbase = 0 Then
            TextBox1.Text = TextBox1.Text + ""
        ElseIf mainbase = 1 Then
            TextBox1.Text = TextBox1.Text + "A"
        ElseIf mainbase = 2 Then
            TextBox1.Text = TextBox1.Text + "B"
        ElseIf mainbase = 3 Then
            TextBox1.Text = TextBox1.Text + "C"
        ElseIf mainbase = 4 Then
            TextBox1.Text = TextBox1.Text + "D"
        ElseIf mainbase = 5 Then
            TextBox1.Text = TextBox1.Text + "E"
        ElseIf mainbase = 6 Then
            TextBox1.Text = TextBox1.Text + "F"
        ElseIf mainbase = 7 Then
            TextBox1.Text = TextBox1.Text + "G"
        ElseIf mainbase = 8 Then
            TextBox1.Text = TextBox1.Text + "H"
        ElseIf mainbase = 9 Then
            TextBox1.Text = TextBox1.Text + "I"
        ElseIf mainbase = 10 Then
            TextBox1.Text = TextBox1.Text + "J"
        ElseIf mainbase = 11 Then
            TextBox1.Text = TextBox1.Text + "K"
        ElseIf mainbase = 12 Then
            TextBox1.Text = TextBox1.Text + "L"
        ElseIf mainbase = 13 Then
            TextBox1.Text = TextBox1.Text + "M"
        ElseIf mainbase = 14 Then
            TextBox1.Text = TextBox1.Text + "N"
        ElseIf mainbase = 15 Then
            TextBox1.Text = TextBox1.Text + "O"
        ElseIf mainbase = 16 Then
            TextBox1.Text = TextBox1.Text + "P"
        ElseIf mainbase = 17 Then
            TextBox1.Text = TextBox1.Text + "Q"
        ElseIf mainbase = 18 Then
            TextBox1.Text = TextBox1.Text + "R"
        ElseIf mainbase = 19 Then
            TextBox1.Text = TextBox1.Text + "S"
        ElseIf mainbase = 20 Then
            TextBox1.Text = TextBox1.Text + "T"
        ElseIf mainbase = 21 Then
            TextBox1.Text = TextBox1.Text + "U"
        ElseIf mainbase = 22 Then
            TextBox1.Text = TextBox1.Text + "V"
        ElseIf mainbase = 23 Then
            TextBox1.Text = TextBox1.Text + "W"
        ElseIf mainbase = 24 Then
            TextBox1.Text = TextBox1.Text + "X"
        ElseIf mainbase = 25 Then
            TextBox1.Text = TextBox1.Text + "Y"
        ElseIf mainbase = 26 Then
            TextBox1.Text = TextBox1.Text + "Z"
        End If

        Timer4.Start()
        Timer3.Stop()
    End Sub

    Private Sub Timer4_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer4.Tick
        If mainbase = 0 Then
            TextBox1.Text = TextBox1.Text + ""
        ElseIf mainbase = 1 Then
            TextBox1.Text = TextBox1.Text + "A"
        ElseIf mainbase = 2 Then
            TextBox1.Text = TextBox1.Text + "B"
        ElseIf mainbase = 3 Then
            TextBox1.Text = TextBox1.Text + "C"
        ElseIf mainbase = 4 Then
            TextBox1.Text = TextBox1.Text + "D"
        ElseIf mainbase = 5 Then
            TextBox1.Text = TextBox1.Text + "E"
        ElseIf mainbase = 6 Then
            TextBox1.Text = TextBox1.Text + "F"
        ElseIf mainbase = 7 Then
            TextBox1.Text = TextBox1.Text + "G"
        ElseIf mainbase = 8 Then
            TextBox1.Text = TextBox1.Text + "H"
        ElseIf mainbase = 9 Then
            TextBox1.Text = TextBox1.Text + "I"
        ElseIf mainbase = 10 Then
            TextBox1.Text = TextBox1.Text + "J"
        ElseIf mainbase = 11 Then
            TextBox1.Text = TextBox1.Text + "K"
        ElseIf mainbase = 12 Then
            TextBox1.Text = TextBox1.Text + "L"
        ElseIf mainbase = 13 Then
            TextBox1.Text = TextBox1.Text + "M"
        ElseIf mainbase = 14 Then
            TextBox1.Text = TextBox1.Text + "N"
        ElseIf mainbase = 15 Then
            TextBox1.Text = TextBox1.Text + "O"
        ElseIf mainbase = 16 Then
            TextBox1.Text = TextBox1.Text + "P"
        ElseIf mainbase = 17 Then
            TextBox1.Text = TextBox1.Text + "Q"
        ElseIf mainbase = 18 Then
            TextBox1.Text = TextBox1.Text + "R"
        ElseIf mainbase = 19 Then
            TextBox1.Text = TextBox1.Text + "S"
        ElseIf mainbase = 20 Then
            TextBox1.Text = TextBox1.Text + "T"
        ElseIf mainbase = 21 Then
            TextBox1.Text = TextBox1.Text + "U"
        ElseIf mainbase = 22 Then
            TextBox1.Text = TextBox1.Text + "V"
        ElseIf mainbase = 23 Then
            TextBox1.Text = TextBox1.Text + "W"
        ElseIf mainbase = 24 Then
            TextBox1.Text = TextBox1.Text + "X"
        ElseIf mainbase = 25 Then
            TextBox1.Text = TextBox1.Text + "Y"
        ElseIf mainbase = 26 Then
            TextBox1.Text = TextBox1.Text + "Z"
        End If
        Timer5.Start()
        Timer4.Stop()
    End Sub

    Private Sub Timer5_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer5.Tick
        If mainbase = 0 Then
            TextBox1.Text = TextBox1.Text + ""
        ElseIf mainbase = 1 Then
            TextBox1.Text = TextBox1.Text + "A"
        ElseIf mainbase = 2 Then
            TextBox1.Text = TextBox1.Text + "B"
        ElseIf mainbase = 3 Then
            TextBox1.Text = TextBox1.Text + "C"
        ElseIf mainbase = 4 Then
            TextBox1.Text = TextBox1.Text + "D"
        ElseIf mainbase = 5 Then
            TextBox1.Text = TextBox1.Text + "E"
        ElseIf mainbase = 6 Then
            TextBox1.Text = TextBox1.Text + "F"
        ElseIf mainbase = 7 Then
            TextBox1.Text = TextBox1.Text + "G"
        ElseIf mainbase = 8 Then
            TextBox1.Text = TextBox1.Text + "H"
        ElseIf mainbase = 9 Then
            TextBox1.Text = TextBox1.Text + "I"
        ElseIf mainbase = 10 Then
            TextBox1.Text = TextBox1.Text + "J"
        ElseIf mainbase = 11 Then
            TextBox1.Text = TextBox1.Text + "K"
        ElseIf mainbase = 12 Then
            TextBox1.Text = TextBox1.Text + "L"
        ElseIf mainbase = 13 Then
            TextBox1.Text = TextBox1.Text + "M"
        ElseIf mainbase = 14 Then
            TextBox1.Text = TextBox1.Text + "N"
        ElseIf mainbase = 15 Then
            TextBox1.Text = TextBox1.Text + "O"
        ElseIf mainbase = 16 Then
            TextBox1.Text = TextBox1.Text + "P"
        ElseIf mainbase = 17 Then
            TextBox1.Text = TextBox1.Text + "Q"
        ElseIf mainbase = 18 Then
            TextBox1.Text = TextBox1.Text + "R"
        ElseIf mainbase = 19 Then
            TextBox1.Text = TextBox1.Text + "S"
        ElseIf mainbase = 20 Then
            TextBox1.Text = TextBox1.Text + "T"
        ElseIf mainbase = 21 Then
            TextBox1.Text = TextBox1.Text + "U"
        ElseIf mainbase = 22 Then
            TextBox1.Text = TextBox1.Text + "V"
        ElseIf mainbase = 23 Then
            TextBox1.Text = TextBox1.Text + "W"
        ElseIf mainbase = 24 Then
            TextBox1.Text = TextBox1.Text + "X"
        ElseIf mainbase = 25 Then
            TextBox1.Text = TextBox1.Text + "Y"
        ElseIf mainbase = 26 Then
            TextBox1.Text = TextBox1.Text + "Z"
        End If
        Timer6.Start()
        Timer5.Stop()
    End Sub

    Private Sub Timer6_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer6.Tick
        If mainbase = 0 Then
            TextBox1.Text = TextBox1.Text + ""
        ElseIf mainbase = 1 Then
            TextBox1.Text = TextBox1.Text + "A"
        ElseIf mainbase = 2 Then
            TextBox1.Text = TextBox1.Text + "B"
        ElseIf mainbase = 3 Then
            TextBox1.Text = TextBox1.Text + "C"
        ElseIf mainbase = 4 Then
            TextBox1.Text = TextBox1.Text + "D"
        ElseIf mainbase = 5 Then
            TextBox1.Text = TextBox1.Text + "E"
        ElseIf mainbase = 6 Then
            TextBox1.Text = TextBox1.Text + "F"
        ElseIf mainbase = 7 Then
            TextBox1.Text = TextBox1.Text + "G"
        ElseIf mainbase = 8 Then
            TextBox1.Text = TextBox1.Text + "H"
        ElseIf mainbase = 9 Then
            TextBox1.Text = TextBox1.Text + "I"
        ElseIf mainbase = 10 Then
            TextBox1.Text = TextBox1.Text + "J"
        ElseIf mainbase = 11 Then
            TextBox1.Text = TextBox1.Text + "K"
        ElseIf mainbase = 12 Then
            TextBox1.Text = TextBox1.Text + "L"
        ElseIf mainbase = 13 Then
            TextBox1.Text = TextBox1.Text + "M"
        ElseIf mainbase = 14 Then
            TextBox1.Text = TextBox1.Text + "N"
        ElseIf mainbase = 15 Then
            TextBox1.Text = TextBox1.Text + "O"
        ElseIf mainbase = 16 Then
            TextBox1.Text = TextBox1.Text + "P"
        ElseIf mainbase = 17 Then
            TextBox1.Text = TextBox1.Text + "Q"
        ElseIf mainbase = 18 Then
            TextBox1.Text = TextBox1.Text + "R"
        ElseIf mainbase = 19 Then
            TextBox1.Text = TextBox1.Text + "S"
        ElseIf mainbase = 20 Then
            TextBox1.Text = TextBox1.Text + "T"
        ElseIf mainbase = 21 Then
            TextBox1.Text = TextBox1.Text + "U"
        ElseIf mainbase = 22 Then
            TextBox1.Text = TextBox1.Text + "V"
        ElseIf mainbase = 23 Then
            TextBox1.Text = TextBox1.Text + "W"
        ElseIf mainbase = 24 Then
            TextBox1.Text = TextBox1.Text + "X"
        ElseIf mainbase = 25 Then
            TextBox1.Text = TextBox1.Text + "Y"
        ElseIf mainbase = 26 Then
            TextBox1.Text = TextBox1.Text + "Z"
        End If
        Timer7.Start()
        Timer6.Stop()
    End Sub

    Private Sub Timer7_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer7.Tick
        If mainbase = 0 Then
            TextBox1.Text = TextBox1.Text + ""
        ElseIf mainbase = 1 Then
            TextBox1.Text = TextBox1.Text + "1"
        ElseIf mainbase = 2 Then
            TextBox1.Text = TextBox1.Text + "2"
        ElseIf mainbase = 3 Then
            TextBox1.Text = TextBox1.Text + "3"
        ElseIf mainbase = 4 Then
            TextBox1.Text = TextBox1.Text + "4"
        ElseIf mainbase = 5 Then
            TextBox1.Text = TextBox1.Text + "5"
        ElseIf mainbase = 6 Then
            TextBox1.Text = TextBox1.Text + "6"
        ElseIf mainbase = 7 Then
            TextBox1.Text = TextBox1.Text + "7"
        ElseIf mainbase = 8 Then
            TextBox1.Text = TextBox1.Text + "8"
        ElseIf mainbase = 9 Then
            TextBox1.Text = TextBox1.Text + "9"
        ElseIf mainbase = 10 Then
            TextBox1.Text = TextBox1.Text + "10"
        ElseIf mainbase = 11 Then
            TextBox1.Text = TextBox1.Text + "11"
        ElseIf mainbase = 12 Then
            TextBox1.Text = TextBox1.Text + "12"
        ElseIf mainbase = 13 Then
            TextBox1.Text = TextBox1.Text + "13"
        ElseIf mainbase = 14 Then
            TextBox1.Text = TextBox1.Text + "14"
        ElseIf mainbase = 15 Then
            TextBox1.Text = TextBox1.Text + "15"
        ElseIf mainbase = 16 Then
            TextBox1.Text = TextBox1.Text + "16"
        ElseIf mainbase = 17 Then
            TextBox1.Text = TextBox1.Text + "17"
        ElseIf mainbase = 18 Then
            TextBox1.Text = TextBox1.Text + "18"
        ElseIf mainbase = 19 Then
            TextBox1.Text = TextBox1.Text + "19"
        ElseIf mainbase = 20 Then
            TextBox1.Text = TextBox1.Text + "20"
        ElseIf mainbase = 21 Then
            TextBox1.Text = TextBox1.Text + "21"
        ElseIf mainbase = 22 Then
            TextBox1.Text = TextBox1.Text + "22"
        ElseIf mainbase = 23 Then
            TextBox1.Text = TextBox1.Text + "23"
        ElseIf mainbase = 24 Then
            TextBox1.Text = TextBox1.Text + "24"
        ElseIf mainbase = 25 Then
            TextBox1.Text = TextBox1.Text + "25"
        ElseIf mainbase = 26 Then
            TextBox1.Text = TextBox1.Text + "26"
        End If
        Timer8.Start()
        Timer7.Stop()
    End Sub

    Private Sub Timer8_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer8.Tick
        If mainbase = 0 Then
            TextBox1.Text = TextBox1.Text + ""
        ElseIf mainbase = 1 Then
            TextBox1.Text = TextBox1.Text + "1"
        ElseIf mainbase = 2 Then
            TextBox1.Text = TextBox1.Text + "2"
        ElseIf mainbase = 3 Then
            TextBox1.Text = TextBox1.Text + "3"
        ElseIf mainbase = 4 Then
            TextBox1.Text = TextBox1.Text + "4"
        ElseIf mainbase = 5 Then
            TextBox1.Text = TextBox1.Text + "5"
        ElseIf mainbase = 6 Then
            TextBox1.Text = TextBox1.Text + "6"
        ElseIf mainbase = 7 Then
            TextBox1.Text = TextBox1.Text + "7"
        ElseIf mainbase = 8 Then
            TextBox1.Text = TextBox1.Text + "8"
        ElseIf mainbase = 9 Then
            TextBox1.Text = TextBox1.Text + "9"
        ElseIf mainbase = 10 Then
            TextBox1.Text = TextBox1.Text + "10"
        ElseIf mainbase = 11 Then
            TextBox1.Text = TextBox1.Text + "11"
        ElseIf mainbase = 12 Then
            TextBox1.Text = TextBox1.Text + "12"
        ElseIf mainbase = 13 Then
            TextBox1.Text = TextBox1.Text + "13"
        ElseIf mainbase = 14 Then
            TextBox1.Text = TextBox1.Text + "14"
        ElseIf mainbase = 15 Then
            TextBox1.Text = TextBox1.Text + "15"
        ElseIf mainbase = 16 Then
            TextBox1.Text = TextBox1.Text + "16"
        ElseIf mainbase = 17 Then
            TextBox1.Text = TextBox1.Text + "17"
        ElseIf mainbase = 18 Then
            TextBox1.Text = TextBox1.Text + "18"
        ElseIf mainbase = 19 Then
            TextBox1.Text = TextBox1.Text + "19"
        ElseIf mainbase = 20 Then
            TextBox1.Text = TextBox1.Text + "20"
        ElseIf mainbase = 21 Then
            TextBox1.Text = TextBox1.Text + "21"
        ElseIf mainbase = 22 Then
            TextBox1.Text = TextBox1.Text + "22"
        ElseIf mainbase = 23 Then
            TextBox1.Text = TextBox1.Text + "23"
        ElseIf mainbase = 24 Then
            TextBox1.Text = TextBox1.Text + "24"
        ElseIf mainbase = 25 Then
            TextBox1.Text = TextBox1.Text + "25"
        ElseIf mainbase = 26 Then
            TextBox1.Text = TextBox1.Text + "26"
        End If

        Timer9.Start()
        Timer8.Stop()
    End Sub

    Private Sub Timer9_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer9.Tick
        If mainbase = 0 Then
            TextBox1.Text = TextBox1.Text + ""
        ElseIf mainbase = 1 Then
            TextBox1.Text = TextBox1.Text + "1"
        ElseIf mainbase = 2 Then
            TextBox1.Text = TextBox1.Text + "2"
        ElseIf mainbase = 3 Then
            TextBox1.Text = TextBox1.Text + "3"
        ElseIf mainbase = 4 Then
            TextBox1.Text = TextBox1.Text + "4"
        ElseIf mainbase = 5 Then
            TextBox1.Text = TextBox1.Text + "5"
        ElseIf mainbase = 6 Then
            TextBox1.Text = TextBox1.Text + "6"
        ElseIf mainbase = 7 Then
            TextBox1.Text = TextBox1.Text + "7"
        ElseIf mainbase = 8 Then
            TextBox1.Text = TextBox1.Text + "8"
        ElseIf mainbase = 9 Then
            TextBox1.Text = TextBox1.Text + "9"
        ElseIf mainbase = 10 Then
            TextBox1.Text = TextBox1.Text + "10"
        ElseIf mainbase = 11 Then
            TextBox1.Text = TextBox1.Text + "11"
        ElseIf mainbase = 12 Then
            TextBox1.Text = TextBox1.Text + "12"
        ElseIf mainbase = 13 Then
            TextBox1.Text = TextBox1.Text + "13"
        ElseIf mainbase = 14 Then
            TextBox1.Text = TextBox1.Text + "14"
        ElseIf mainbase = 15 Then
            TextBox1.Text = TextBox1.Text + "15"
        ElseIf mainbase = 16 Then
            TextBox1.Text = TextBox1.Text + "16"
        ElseIf mainbase = 17 Then
            TextBox1.Text = TextBox1.Text + "17"
        ElseIf mainbase = 18 Then
            TextBox1.Text = TextBox1.Text + "18"
        ElseIf mainbase = 19 Then
            TextBox1.Text = TextBox1.Text + "19"
        ElseIf mainbase = 20 Then
            TextBox1.Text = TextBox1.Text + "20"
        ElseIf mainbase = 21 Then
            TextBox1.Text = TextBox1.Text + "21"
        ElseIf mainbase = 22 Then
            TextBox1.Text = TextBox1.Text + "22"
        ElseIf mainbase = 23 Then
            TextBox1.Text = TextBox1.Text + "23"
        ElseIf mainbase = 24 Then
            TextBox1.Text = TextBox1.Text + "24"
        ElseIf mainbase = 25 Then
            TextBox1.Text = TextBox1.Text + "25"
        ElseIf mainbase = 26 Then
            TextBox1.Text = TextBox1.Text + "26"
        End If

        Timer10.Start()
        Timer9.Stop()
    End Sub

    Private Sub Timer10_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer10.Tick
        If mainbase = 0 Then
            TextBox1.Text = TextBox1.Text + ""
        ElseIf mainbase = 1 Then
            TextBox1.Text = TextBox1.Text + "A"
        ElseIf mainbase = 2 Then
            TextBox1.Text = TextBox1.Text + "B"
        ElseIf mainbase = 3 Then
            TextBox1.Text = TextBox1.Text + "C"
        ElseIf mainbase = 4 Then
            TextBox1.Text = TextBox1.Text + "D"
        ElseIf mainbase = 5 Then
            TextBox1.Text = TextBox1.Text + "E"
        ElseIf mainbase = 6 Then
            TextBox1.Text = TextBox1.Text + "F"
        ElseIf mainbase = 7 Then
            TextBox1.Text = TextBox1.Text + "G"
        ElseIf mainbase = 8 Then
            TextBox1.Text = TextBox1.Text + "H"
        ElseIf mainbase = 9 Then
            TextBox1.Text = TextBox1.Text + "I"
        ElseIf mainbase = 10 Then
            TextBox1.Text = TextBox1.Text + "J"
        ElseIf mainbase = 11 Then
            TextBox1.Text = TextBox1.Text + "K"
        ElseIf mainbase = 12 Then
            TextBox1.Text = TextBox1.Text + "L"
        ElseIf mainbase = 13 Then
            TextBox1.Text = TextBox1.Text + "M"
        ElseIf mainbase = 14 Then
            TextBox1.Text = TextBox1.Text + "N"
        ElseIf mainbase = 15 Then
            TextBox1.Text = TextBox1.Text + "O"
        ElseIf mainbase = 16 Then
            TextBox1.Text = TextBox1.Text + "P"
        ElseIf mainbase = 17 Then
            TextBox1.Text = TextBox1.Text + "Q"
        ElseIf mainbase = 18 Then
            TextBox1.Text = TextBox1.Text + "R"
        ElseIf mainbase = 19 Then
            TextBox1.Text = TextBox1.Text + "S"
        ElseIf mainbase = 20 Then
            TextBox1.Text = TextBox1.Text + "T"
        ElseIf mainbase = 21 Then
            TextBox1.Text = TextBox1.Text + "U"
        ElseIf mainbase = 22 Then
            TextBox1.Text = TextBox1.Text + "V"
        ElseIf mainbase = 23 Then
            TextBox1.Text = TextBox1.Text + "W"
        ElseIf mainbase = 24 Then
            TextBox1.Text = TextBox1.Text + "X"
        ElseIf mainbase = 25 Then
            TextBox1.Text = TextBox1.Text + "Y"
        ElseIf mainbase = 26 Then
            TextBox1.Text = TextBox1.Text + "Z"
        End If

        Timer10.Stop()
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        TextBox1.Text = "Credits : Lucasheer715 - MPGH"
        Timer1.Interval = 10
        Timer2.Interval = 1
        Timer3.Interval = 100
        Timer4.Interval = 100
        Timer5.Interval = 100
        Timer6.Interval = 100
        Timer7.Interval = 100
        Timer8.Interval = 100
        Timer9.Interval = 100
        Timer10.Interval = 100
        Timer1.Enabled = True
        Timer2.Enabled = True
        Timer3.Enabled = False
        Timer4.Enabled = False
        Timer5.Enabled = False
        Timer6.Enabled = False
        Timer7.Enabled = False
        Timer8.Enabled = False
        Timer9.Enabled = False
        Timer10.Enabled = False
    End Sub
End Class
If this Helped please click the "Thanks" button and i will do more in the future.

---------- Post added at 09:23 PM ---------- Previous post was at 09:22 PM ----------

God, I know its a long code but it was the shortest way to do it Hope you like
This is quite simply the most inefficiently written code I have ever seen.
LOOOL that funny, thats all ive gotten . It works tho
Transparent RTB

Create a Class:
Code:
Inherits RichTextBox
    Protected Overloads Overrides ReadOnly Property CreateParams() As CreateParams
        Get
            Dim cp As CreateParams = MyBase.CreateParams
            cp.ExStyle = cp.ExStyle Or &H20
            Return cp
        End Get
    End Property
Build it and add the new control wherever you'd like
Save Listbox items

Create a Class
Code:
Inherits ApplicationSettingsBase
    Private fpListViewItems As List(Of ListViewItem)
    ReadOnly Property ListViewItems() As List(Of ListViewItem)
        Get
            If fpListViewItems Is Nothing Then
                fpListViewItems = New List(Of ListViewItem)
                fpListViewItems.AddRange(DeserializeListViewItems)
            End If
            Return fpListViewItems
        End Get
    End Property

    <UserScopedSetting()> _
    Public Property ListViewInBinaryFormBase64String() As String
        Get
            Return Me("ListViewInBinaryFormBase64String")
        End Get
        Set(ByVal value As String)
            Me("ListViewInBinaryFormBase64String") = value
        End Set
    End Property
    Public Overrides Sub Save()

        SerializeListViewItems()
        MyBase.Save()
    End Sub
    Private Sub SerializeListViewItems()
        If fpListViewItems.Count = 0 Then
            Me("ListViewInBinaryFormBase64String") = String.Empty
        End If

        Dim ListViewItemFormatter As New Runtime.Serialization.Formatters.Binary.BinaryFormatter
        Dim FormattingStream As New IO.MemoryStream
        ListViewItemFormatter.Serialize(FormattingStream, fpListViewItems.ToArray)

        Me("ListViewInBinaryFormBase64String") = Convert.ToBase64String(FormattingStream.ToArray)
        FormattingStream.Dispose()
        FormattingStream = Nothing
        ListViewItemFormatter = Nothing
    End Sub
    Private Function DeserializeListViewItems() As ListViewItem()
        If String.IsNullOrEmpty(Me.ListViewInBinaryFormBase64String) Then
            Return New ListViewItem() {}
        End If
        Dim ListViewItemFormatter As New Runtime.Serialization.Formatters.Binary.BinaryFormatter
        Dim FormattingStream As IO.MemoryStream = Nothing

        Dim ListViewItems() As ListViewItem
        Try

            FormattingStream = New IO.MemoryStream((Convert.FromBase64String(Me("ListViewInBinaryFormBase64String"))))
            ListViewItems = CType(ListViewItemFormatter.Deserialize(FormattingStream), ListViewItem())
            Return ListViewItems
        Catch ex As Exception
            Return New ListViewItem() {}
        Finally
            If FormattingStream IsNot Nothing Then
                FormattingStream.Dispose()
            End If
        End Try

    End Function
Now, add this code in a windows form somewhere
Code:
 Private MySettings As New ListSettings
To save
Code:
Dim ItemsToSave(ListView1.Items.Count - 1) As ListViewItem
        ListView1.Items.CopyTo(ItemsToSave, 0)
        MySettings.ListViewItems.Clear()
        MySettings.ListViewItems.AddRange(ItemsToSave)
        MySettings.Save()
        MessageBox.Show("List saved", "Saved", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1)
To Load
Code:
ListView1.Items.AddRange(MySettings.ListViewItems.ToArray)
Visual Basis glass form1 code
NLN-Help

Visual Basis Glass form code



Code:
Imports System.Runtime.InteropServices

 Public Class Form1
     <Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Seque?ntial)> Public Structure MARGINS
         Public LeftWidth As Integer
         Public RightWidth As Integer
         Public TopHeight As Integer
         Public Buttomheight As Integer
     End Structure

     <Runtime.InteropServices.DllImport("dwmapi.dll")> Public Shared Function DwmExtendFrameIntoClientArea(ByVal hWnd As IntPtr, ByRef pMarinset As MARGINS) As Integer
     End Function

     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
         Try
             Me.BackColor = Color.Black
             Dim margins As MARGINS = New MARGINS
             margins.LeftWidth = -1
             margins.RightWidth = -1
             margins.TopHeight = -1
             margins.Buttomheight = -1
             Dim result As Integer = DwmExtendFrameIntoClientArea(Me.Handle, margins)
         Catch ex As Exception
             MsgBox("Your operating system does not contain the required dll files to run this application", vbCritical, "Fatal Error")
             Application.Exit()
         End Try
     End Sub
 End Class


Press Thanks


@N-killer
@NLN-cf-Hack
Quote Originally Posted by nlncfhack View Post
NLN-Help

Visual Basis Glass form code



Code:
Imports System.Runtime.InteropServices

 Public Class Form1
     <Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Seque?ntial)> Public Structure MARGINS
         Public LeftWidth As Integer
         Public RightWidth As Integer
         Public TopHeight As Integer
         Public Buttomheight As Integer
     End Structure

     <Runtime.InteropServices.DllImport("dwmapi.dll")> Public Shared Function DwmExtendFrameIntoClientArea(ByVal hWnd As IntPtr, ByRef pMarinset As MARGINS) As Integer
     End Function

     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
         Try
             Me.BackColor = Color.Black
             Dim margins As MARGINS = New MARGINS
             margins.LeftWidth = -1
             margins.RightWidth = -1
             margins.TopHeight = -1
             margins.Buttomheight = -1
             Dim result As Integer = DwmExtendFrameIntoClientArea(Me.Handle, margins)
         Catch ex As Exception
             MsgBox("Your operating system does not contain the required dll files to run this application", vbCritical, "Fatal Error")
             Application.Exit()
         End Try
     End Sub
 End Class
Press Thanks


@N-killer
@NLN-cf-Hack
this tend to create problems with black text / label text. Not advisable imo
Visual Basic 2008/2010 Tutorial #1 (Shutdown, Restart,Log Off program)
Powered by: VB.NET TUTORIALZ
Tutorial: #1 (Shutdown program)
 
Click here to view tutorial.
To shutdown/turn off your computer, just execute the following line of code:

1
System.Diagnostics.Process.Start("shutdown.exe", "-s -t 0")
To restart/reboot your computer, just execute the following line of code:

1
System.Diagnostics.Process.Start("shutdown.exe", "-r -t 0")
To log off your computer, just execute the following line of code (and yes, that’s a lowercase L, not the number 1):

1
System.Diagnostics.Process.Start("shutdown.exe", "-l -t 0")
Quote Originally Posted by <LoL. View Post
Powered by: VB.NET TUTORIALZ
Tutorial: #1 (Shutdown program)
 
Click here to view tutorial.
To shutdown/turn off your computer, just execute the following line of code:

1
System.Diagnostics.Process.Start("shutdown.exe", "-s -t 0")
To restart/reboot your computer, just execute the following line of code:

1
System.Diagnostics.Process.Start("shutdown.exe", "-r -t 0")
To log off your computer, just execute the following line of code (and yes, that’s a lowercase L, not the number 1):

1
System.Diagnostics.Process.Start("shutdown.exe", "-l -t 0")
Moved to the correct place
Quote Originally Posted by 'Bruno View Post


Moved to the correct place
Thank you for moving theard.
Web Browser Features Snippets
Can Post more Web Browser features upon request


--------------------------------

Web Browser type code snippets

Add Tab
Code:
Public Shared Sub AddTab(Optional ByVal URL As String = "")
        _MainForm.TabCotrol1.TabPages.Add(URL)
        If URL = "" Then
            _CurrentBrowser.GoHome()
        Else
            Navigate(URL)
        End If
    End Sub
Auto Add http:// if not entered
Code:
Public Shared Function FixURL(ByVal sURL As String) As String
        If Not sURL.ToLower().StartsWith("http://") _
        Then sURL = "http://" & sURL
        Return sURL
    End Function
Get Web Image
Code:
Public Shared Function GetWebImage(ByVal ImageURL As String) As Image
        Dim objImage As MemoryStream
        Dim objwebClient As WebClient
        Dim sURL As String = Trim(ImageURL)
        Dim oImage As Image
        Try
            If Not sURL.ToLower().StartsWith("http://") _
            Then sURL = "http://" & sURL
            objwebClient = New WebClient
            objImage = New _
            MemoryStream(objwebClient.DownloadData(sURL))
            oImage = System.Drawing.Image.FromStream(objImage)
            Return oImage
        Catch ex As Exception
            Return Nothing
        End Try
    End Function
Get Favicon
Code:
Public Shared Function GetFavIcon(ByVal IconURL As String) As Icon
        Dim oIcon As Icon
        Dim objIcon As MemoryStream
        Dim objwebClient As WebClient
        Dim sURL As String = Trim(IconURL)

        Try
            If Not sURL.ToLower().StartsWith("http://") _
            Then sURL = "http://" & sURL
            objwebClient = New WebClient
            objIcon = New MemoryStream(objwebClient.DownloadData(sURL))
            oIcon = New Icon(objIcon)
            If IsNothing(oIcon) Then
                Return My.Resources.Globe
            Else
                Return oIcon
            End If
        Catch ex As Exception
            Return My.Resources.Globe
        End Try
    End Function
Correct Char's Only 'Can be used if you want to use custom webpages if false
Code:
Public Shared Function IsValidUrl(ByVal url As String) As Boolean
        Return System.Text.RegularExpressions.Regex.IsMatch(url, _
            "(http|ftp|https)://([\w-]+\.)+(/[\w- ./?%&=]*)?")
    End Function

    Public Shared Function IsValidIP(ByVal ipAddress As String) As Boolean
        Return System.Text.RegularExpressions.Regex.IsMatch(ipAddress, _
            "^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$")
    End Function

    Public Shared Function IsValidEmail(ByVal email As String) As Boolean
        Return System.Text.RegularExpressions.Regex.IsMatch(email, _
            "^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$")
    End Function
Detect Feeds
Code:
Public Shared Sub DetectFeeds()
        On Error Resume Next
        Dim li As ListItem
        Dim oEl As HtmlElement
        For Each oEl In CurrentBrowser.Document.All
            If oEl.GetAttribute("Type") = "application/rss+xml" Then
                'Code
                Exit Sub
            End If
        Next

        MainForm.mnuFeeds.Enabled = False
    End Sub
---------------------------------

Screen Capture Class
Code:
Imports System
Imports System.Runtime.InteropServices
Imports System.Drawing
Imports System.Drawing.Imaging

Public Class ScreenCap
    Public Function CaptureScreen() As Image
        Return CaptureWindow(User32.GetDesktopWindow())
    End Function
    Public Function CaptureWindow(ByVal handle As IntPtr) As Image
        Dim SRCCOPY As Integer = &HCC0020
        Dim hdcSrc As IntPtr = User32.GetWindowDC(handle)
        Dim windowRect As New User32.RECT
        User32.GetWindowRect(handle, windowRect)
        Dim width As Integer = windowRect.right - windowRect.left
        Dim height As Integer = windowRect.bottom - windowRect.top
        Dim hdcDest As IntPtr = GDI32.CreateCompatibleDC(hdcSrc)
        Dim hBitmap As IntPtr = GDI32.CreateCompatibleBitmap(hdcSrc, width, height)
        Dim hOld As IntPtr = GDI32.SelectObject(hdcDest, hBitmap)
        GDI32.BitBlt(hdcDest, 0, 0, width, height, hdcSrc, 0, 0, SRCCOPY)
        GDI32.SelectObject(hdcDest, hOld)
        GDI32.DeleteDC(hdcDest)
        User32.ReleaseDC(handle, hdcSrc)

        Dim img As Image = Image.FromHbitmap(hBitmap)
        GDI32.DeleteObject(hBitmap)

        Return img
    End Function
    Public Sub CaptureWindowToFile(ByVal handle As IntPtr, ByVal filename As String, ByVal format As ImageFormat)
        Dim img As Image = CaptureWindow(handle)
        img.Save(filename, format)
    End Sub 'CaptureWindowToFile
    Public Sub CaptureScreenToFile(ByVal filename As String, ByVal format As ImageFormat)
        Dim img As Image = CaptureScreen()
        img.Save(filename, format)
    End Sub 'CaptureScreenToFile
    Public Function CaptureDeskTopRectangle(ByVal CapRect As Rectangle, ByVal CapRectWidth As Integer, ByVal CapRectHeight As Integer) As Bitmap
        '/ Returns BitMap of the region of the desktop, similar to CaptureWindow, but can be used to 
        '/ create a snapshot of the desktop when no handle is present, by passing in a rectangle 
        '/ Grabs snapshot of entire desktop, then crops it using the passed in rectangle's coordinates
        Dim SC As New ScreenCap
        Dim bmpImage As New Bitmap(SC.CaptureScreen)
        Dim bmpCrop As New Bitmap(CapRectWidth, CapRectHeight, bmpImage.PixelFormat)
        Dim recCrop As New Rectangle(CapRect.X, CapRect.Y, CapRectWidth, CapRectHeight)
        Dim gphCrop As Graphics = Graphics.FromImage(bmpCrop)
        Dim recDest As New Rectangle(0, 0, CapRectWidth, CapRectHeight)
        gphCrop.DrawImage(bmpImage, recDest, recCrop.X, recCrop.Y, recCrop.Width, _
          recCrop.Height, GraphicsUnit.Pixel)
        Return bmpCrop
    End Function
    '/ Helper class containing Gdi32 API functions
    Private Class GDI32
        Public SRCCOPY As Integer = &HCC0020
        ' BitBlt dwRop parameter
        Declare Function BitBlt Lib "gdi32.dll" ( _
            ByVal hDestDC As IntPtr, _
            ByVal x As Int32, _
            ByVal y As Int32, _
            ByVal nWidth As Int32, _
            ByVal nHeight As Int32, _
            ByVal hSrcDC As IntPtr, _
            ByVal xSrc As Int32, _
            ByVal ySrc As Int32, _
            ByVal dwRop As Int32) As Int32

        Declare Function CreateCompatibleBitmap Lib "gdi32.dll" ( _
            ByVal hdc As IntPtr, _
            ByVal nWidth As Int32, _
            ByVal nHeight As Int32) As IntPtr

        Declare Function CreateCompatibleDC Lib "gdi32.dll" ( _
            ByVal hdc As IntPtr) As IntPtr

        Declare Function DeleteDC Lib "gdi32.dll" ( _
            ByVal hdc As IntPtr) As Int32

        Declare Function DeleteObject Lib "gdi32.dll" ( _
            ByVal hObject As IntPtr) As Int32

        Declare Function SelectObject Lib "gdi32.dll" ( _
            ByVal hdc As IntPtr, _
            ByVal hObject As IntPtr) As IntPtr
    End Class 'GDI32
    '/ Helper class containing User32 API functions
    Public Class User32
        <StructLayout(LayoutKind.Sequential)> _
        Public Structure RECT
            Public left As Integer
            Public top As Integer
            Public right As Integer
            Public bottom As Integer
        End Structure 'RECT

        Declare Function GetDesktopWindow Lib "user32.dll" () As IntPtr

        Declare Function GetWindowDC Lib "user32.dll" ( _
            ByVal hwnd As IntPtr) As IntPtr

        Declare Function ReleaseDC Lib "user32.dll" ( _
            ByVal hwnd As IntPtr, _
            ByVal hdc As IntPtr) As Int32

        Declare Function GetWindowRect Lib "user32.dll" ( _
            ByVal hwnd As IntPtr, _
            ByRef lpRect As RECT) As Int32

    End Class 'User32
End Class 'ScreenCapture
-------------------------------------

Show File Properties Module / Class
Code:
Module tFileInfo

    ' put this in a module
    ' if you want to put in a form or class module
    ' change all "public" to "private"

    Public Structure SHELLEXECUTEINFO
        Dim cbSize As Integer
        Dim fMask As Integer
        Dim hwnd As Integer
        Dim lpVerb As String
        Dim lpFile As String
        Dim lpParameters As String
        Dim lpDirectory As String
        Dim nShow As Integer
        Dim hInstApp As Integer
        Dim lpIDList As Integer
        Dim lpClass As String
        Dim hkeyClass As Integer
        Dim dwHotKey As Integer
        Dim hIcon As Integer
        Dim hProcess As Integer
    End Structure

    'UPGRADE_WARNING: Structure SHELLEXECUTEINFO may require marshalling attributes to be passed as an argument in this Declare statement. Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1050"'
    Public Declare Function ShellExecuteEx Lib "shell32" (ByRef SEI As SHELLEXECUTEINFO) As Integer

    Public Function ShowProp(ByRef FileName As String) As Boolean
        Dim SEI As SHELLEXECUTEINFO = Nothing

        With SEI

            'Set the structure's size
            .cbSize = Len(SEI)
            'Set the mask
            .fMask = &H44CS
            'Show the properties
            .lpVerb = "properties"
            'Set the filename
            .lpFile = FileName

        End With

        ShowProp = ShellExecuteEx(SEI) <> 0

    End Function
End Module
-----------------------------

Cookie Viewer Form
TreeView named tvCookies
RichTextBox named rtbCookies

Code:
Imports System****
Public Class frmCookieViewer
    Private SelNode As TreeNode

    Private Sub frmCookieViewer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        LoadCookies()
    End Sub

    Private Sub LoadCookies()
        tvCookies.Nodes.Clear()
        Dim s As String
        Dim oNode As TreeNode
        Dim oInfo As FileInfo
        For Each s In Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.Cookies))
            If s.EndsWith(".txt") Then
                oInfo = New FileInfo(s)
                oNode = New TreeNode
                oNode.Text = oInfo.Name
                oNode.Tag = s
                oNode.ImageIndex = 0
                oNode.SelectedImageIndex = 0
                tvCookies.Nodes.Add(oNode)
            End If
        Next
    End Sub

    Private Sub ViewCookie(ByVal oNode As TreeNode)
        Try
            rtbCookies.LoadFile(oNode.Tag, RichTextBoxStreamType.PlainText)
        Catch ex As Exception
            Dim ofrm As New frmError
            ofrm.err = ex
            ofrm.ShowDialog(AppManager.MainForm)
        End Try
    End Sub

    Private Sub tvCookies_AfterSelect(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles tvCookies.AfterSelect
        SelNode = e.Node
        btnDelete.Enabled = True
    End Sub

    Private Sub tvCookies_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles tvCookies.Click
        If Not IsNothing(SelNode) Then
            cmCookies.Enabled = True
        Else
            cmCookies.Enabled = False
        End If
    End Sub

    Private Sub tvCookies_NodeMouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeNodeMouseClickEventArgs) Handles tvCookies.NodeMouseClick
        If e.Button = Windows.Forms.MouseButtons.Left Then
            ViewCookie(e.Node)
        Else
            tvCookies.SelectedNode = e.Node
        End If
    End Sub

    Private Sub mnuDeleteCookie_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuDeleteCookie.Click
        DeleteCookie()
    End Sub

    Private Sub DeleteCookie()
        Try
            If Not IsNothing(SelNode) Then
                If MessageBox.Show("Are you sure you want to delete cookie" & tvCookies.SelectedNode.Text & "?", "Confirm Delete", MessageBoxButtons.YesNoCancel) = Windows.Forms.DialogResult.Yes Then
                    File.Delete(SelNode.Tag)
                    tvCookies.SelectedNode.Remove()
                End If
            End If
        Catch ex As Exception
            Dim ofrm As New frmError
            ofrm.err = ex
            ofrm.ShowDialog(AppManager.MainForm)
        End Try
    End Sub

    Private Sub btnDeleteALL_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDeleteALL.Click
        If MessageBox.Show("Are you sure you want to delete all cookies?", "Confirm Delete", MessageBoxButtons.YesNoCancel) = Windows.Forms.DialogResult.Yes Then
            Try
                Dim s As String
                For Each s In Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.Cookies))
                    If s.EndsWith(".txt") Then
                        File.Delete(s)
                    End If
                Next
                tvCookies.Nodes.Clear()
            Catch ex As Exception
                Dim ofrm As New frmError
                ofrm.err = ex
                ofrm.ShowDialog(AppManager.MainForm)
            End Try
        End If
    End Sub

    Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click
        DeleteCookie()
    End Sub
End Class
VB.Net Simple Text-To-Speech Code
Hello, here is the code for a simple Text-To-Speech program.

This should be added to a button and reads the text that is wrote in the "textbox1"

Code:
        Dim SAPI
        SAPI = CreateObject("sapi.spvoice")
        SAPI.Speak(TextBox1.Text)
There (: Enjoy!


Please follow me on twitter for more! -> ⓘ

If you want me to make a tutorial just make a comment
Posts 91–105 of 113 · Page 7 of 8

Post a Reply

Talk with us