Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tut] Generating Random Strings (200 Random Results = LIMIT) [Tut]
#1
Hey guys... Today I am going to show you how to generate random strings. You may call this a Keygen, but an amateur version.

Start off with 2 buttons and a textbox.


Button1 Code [Generate]:
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim Key As Integer
        Key = Int(Rnd() * 5) 'The number 5 is replaced with the Maximum number of cases you have created.
        Select Key
            Case 0
                TextBox1.Text = "John Ronder"
            Case 1
                TextBox1.Text = "Mary Hudkins"
            Case 2
                TextBox1.Text = "Jessy Gonvolio"
            Case 3
                TextBox1.Text = "Emily Jansen"
            Case 4
                TextBox1.Text = "Josh Federton"
            Case 5
                TextBox1.Text = "Sean Richman"
        End Select
    End Sub

Button2 Code [Copy Text]:
Code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Try
            Clipboard.SetText(TextBox1.Text)
        Catch ex As Exception
            MsgBox("Please Generate a name", 16, "Error")
        End Try
    End Sub

Results Should Look like This:
[Image: dc37fc57670ff4e917d8c77d67b1d01c.png]

Enjoy and don't forget to say thanks if you liked my tutorial.

[Image: t5BWm.png]
Reply


Messages In This Thread
[Tut] Generating Random Strings (200 Random Results = LIMIT) [Tut] - by Resistance - 03-20-2011, 11:42 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to hook the keyboard. [VB.NET] [TuT] Vorfin 92 57,106 09-23-2019, 11:55 AM
Last Post: Jamimartin
  [TUT]Creating Advanced Web Browser with Awesome Theme Imaking31 0 1,320 05-25-2013, 03:12 AM
Last Post: Imaking31
  VB.NET Port Scanner [TUT] Fragma 30 13,142 11-27-2012, 11:26 PM
Last Post: ƃu∀ ıʞƃu∀
  [TUT] MD5 Encrypter & Finder [VB.NET] Fragma 12 7,220 11-25-2012, 10:36 PM
Last Post: ƃu∀ ıʞƃu∀
  [TUT] How to make a simple WebBrowser in VB 2010! [TUT] - [ Pictures] Statics 95 57,221 10-07-2012, 06:56 AM
Last Post: a99

Forum Jump:


Users browsing this thread: 9 Guest(s)