How to generate random numbers and letters (help)

Discussion in 'Programming General' started by w000t, Feb 5, 2011.

How to generate random numbers and letters (help)
  1. Unread #1 - Feb 5, 2011 at 2:09 AM
  2. w000t
    Joined:
    Jan 23, 2007
    Posts:
    2,608
    Referrals:
    0
    Sythe Gold:
    0

    w000t Grand Master
    $5 USD Donor

    How to generate random numbers and letters (help)

    Well I've begun working on my first VB.net program its a password genorator all it does is generates a random sequence for a password and i cant seem to figure out how to get it to generate random numbers and letters. Any help is appreciated.
     
  3. Unread #2 - Feb 5, 2011 at 10:49 PM
  4. NullzHost
    Joined:
    Feb 5, 2011
    Posts:
    4
    Referrals:
    0
    Sythe Gold:
    0

    NullzHost Newcomer

    How to generate random numbers and letters (help)

    First implment this code in your form:
    Code:
        Private Function RandomNumberAsString(ByVal Min As Int32, ByVal Max As Int32) As String
            Return (New Random).Next(Min, Max).ToString
        End Function
    Then when a user clicks Button1 or whatever put this code for it.
    Code:
    TextBox1.Text = Me.RandomNumberAsString(1000, 999999)
    This will randomly generate a number between 1000 and 999999, change it as needed.
     
  5. Unread #3 - Feb 10, 2011 at 8:49 AM
  6. SLiZZaRD
    Joined:
    Feb 4, 2011
    Posts:
    230
    Referrals:
    1
    Sythe Gold:
    0

    SLiZZaRD Active Member
    Banned

    How to generate random numbers and letters (help)

    Code is set to the standard length of eight. Shoot me a PM if you're unable to apply.

    If your not 100% with you "for loops" then look at this tutorial: http://www.youtube.com/watch?v=aM_5FWRk23c

    It's fairly basic but you get the idea.
     
< Need Some Help "Rs Account Creator" | ok, so heres my idea for a project >

Users viewing this thread
1 guest


 
 
Adblock breaks this site