|
-
Jul 1st, 2001, 02:50 AM
#1
Thread Starter
Hyperactive Member
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 {
}
-
Jul 1st, 2001, 03:47 AM
#2
Fanatic Member
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
-
Jul 1st, 2001, 03:47 AM
#3
Fanatic Member
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
-
Jul 1st, 2001, 03:49 AM
#4
Thread Starter
Hyperactive Member
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 {
}
-
Jul 1st, 2001, 04:10 AM
#5
Fanatic Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|