Results 1 to 4 of 4

Thread: VB.NET -- Random Key Generator

  1. #1
    Variable Bitrate
    Auto Apps:loading...
    thekl0wn's Avatar
    Join Date
    Apr 2005
    Location
    PoCo, Indiana
    Posts
    284

    VB.NET -- Random Key Generator

    Don't know if this is useful to anyone else, but I had a quick need for random strings of alphanumeric nonsense this morning, and opted to play around a create a silly class of my own to do it. Source code attached for the class. Nothing special... Used Visual Studio 2008 Express to create it.

    Example usage:
    Code:
    Dim KeyGen As New RandomKeyGenerator
    Dim myKey As String = KeyGen.Generate(40)
    Dim myKeyWithSeparator As String = KeyGen.Generate(40, 10)
    
    MsgBox(myKey, MsgBoxStyle.OkOnly, "New Key w/no Separator...")
    MsgBox(myKeyWithSeparator, MsgBoxStyle.OkOnly, "New Key with Separator...")
    Attached Files Attached Files
    Play with it, 'til it's broke.

  2. #2
    Newbie
    Join Date
    May 2012
    Posts
    2

    Question TextBox as MsgBox

    hi,
    you make a keygen what shot key in a MsgBox and i will upgrate it with a Generate Button and a TextBox but...

    MsgBox(myKeyWithSeparator, MsgBoxStyle.OkOnly, "New Key with Separator...")

    this i will make to textBox lile so:

    TextBox(myKeyWithSeparator, TextBoxStyle.OkOnly, "New Key with Separator...")

    have you some ideas?





    p.s. im from germany thereforce my english is so badly..

  3. #3
    Newbie
    Join Date
    May 2012
    Posts
    2
    hi,
    you make a keygen what shot key in a MsgBox and i will upgrate it with a Generate Button and a TextBox but...

    MsgBox(myKeyWithSeparator, MsgBoxStyle.OkOnly, "New Key with Separator...")

    this i will make to textBox lile so:

    TextBox(myKeyWithSeparator, TextBoxStyle.OkOnly, "New Key with Separator...")

    have you some ideas?





    p.s. im from germany thereforce my english is so badly.. and i think i double post sorry when not ignor this

  4. #4
    Variable Bitrate
    Auto Apps:loading...
    thekl0wn's Avatar
    Join Date
    Apr 2005
    Location
    PoCo, Indiana
    Posts
    284
    You want the value to appear in a TextBox? If that is what you want, then try this:

    Code:
    ' assume textbox is named txtKeyWithSeparator
    txtKeyWithSeparator.Text = myKeyWithSeparator
    MsgBox( ) is a function that pops u a message box. TextBox is a control on your window/form, and you will need to set the .Text property of it.

    Hope this helps.
    Play with it, 'til it's broke.

Similar Threads

  1. Turning key from ACC to Crank = Laptop will standby
    By l00kster in forum Power Supplies
    Replies: 0
    Last Post: 11-15-2007, 02:27 PM
  2. Random...Little too Random
    By Prindle19 in forum Centrafuse
    Replies: 1
    Last Post: 01-17-2005, 06:30 PM
  3. NaviVoice v.6 RELEASED!
    By 0l33l in forum PowerVoice
    Replies: 28
    Last Post: 10-11-2004, 01:34 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •