Results 1 to 5 of 5

Thread: Create random number/letters?

  1. #1

    Thread Starter
    Hyperactive Member Cmdr0Sunburn's Avatar
    Join Date
    May 2001
    Location
    g0t r00t?
    Posts
    461

    Question Create random number/letters?

    i need a code that makes random combonations of letters and numbers. in a text box or whatever
    I know a lot oF Vb, expert in C++, and i think in assembly.
    MSVC++6.NET
    vb6
    masm
    Windowz Xp
    I find my self using this a lot in C++

    __asm {
    }

  2. #2
    Fanatic Member prog_tom's Avatar
    Join Date
    May 2001
    Location
    Los Angeles and Little Rock
    Posts
    810

    Talking OK man. It's easy!

    just follow me and you will do it


    Dim thenum as Integer


    Private Sub Form_Load()
    Dim thenom as Integer
    Randomize
    thenom = "100" 'Generate from 1 to 100
    thenum = Int((Rnd*thenum) +(1))
    msgbox thenum
    End Sub

    prog_tom
    JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
    http://physics.sviesoft.com/forum

  3. #3
    Fanatic Member prog_tom's Avatar
    Join Date
    May 2001
    Location
    Los Angeles and Little Rock
    Posts
    810

    Talking OK man. It's easy!

    just follow me and you will do it


    Dim thenum as Integer


    Private Sub Form_Load()
    Dim thenom as Integer
    Randomize
    thenom = "100" 'Generate from 1 to 100
    thenum = Int((Rnd*thenum) +(1))
    msgbox thenum
    End Sub



    Oh, and did I mention that I'm only 12?

    prog_tom
    JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
    http://physics.sviesoft.com/forum

  4. #4

    Thread Starter
    Hyperactive Member Cmdr0Sunburn's Avatar
    Join Date
    May 2001
    Location
    g0t r00t?
    Posts
    461
    must hav letters in it too
    I know a lot oF Vb, expert in C++, and i think in assembly.
    MSVC++6.NET
    vb6
    masm
    Windowz Xp
    I find my self using this a lot in C++

    __asm {
    }

  5. #5
    Fanatic Member prog_tom's Avatar
    Join Date
    May 2001
    Location
    Los Angeles and Little Rock
    Posts
    810

    Wink Use a "Number" to represent a Letter, num

    It's so easy


    Dim thenum as Integer
    Dim theletter as string


    Private Sub Form_Load()
    Dim thenom as Integer
    Randomize
    thenom = "100" 'Generate from 1 to 100
    thenum = Int((Rnd*thenum) +(1))
    Call ce
    End Sub


    Sub ce()
    if thenum = "1" then
    theletter = "O"
    elseif thenum = "2" then
    theletter = "p"
    else
    theletter=""
    end if
    End Sub



    Just do it like that and so on...
    I'm only 12, man, how old are you bro?

    prog_tom
    JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
    http://physics.sviesoft.com/forum

Posting Permissions

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



Click Here to Expand Forum to Full Width