|
-
Mar 27th, 2002, 07:08 PM
#1
Thread Starter
New Member
random form help
hey people, im making a program similar to the "magic 8 ball" where when you click on the command button for your answer a random form will pop up with your answer. i have 6 forms but i cant get only 1 to come up, just all 6 of them. im very new at this so if its a simple answer then please excuse my ignorance. im using show commands to get them to come up (because thats the only command i know to bring them up) any help would be great! thanks!
-
Mar 28th, 2002, 07:10 AM
#2
Not NoteMe
Is the only thing on these forms a message? If so you could just show a messagebox
VB Code:
msgbox "My sources say yes"
Which ever way you do it, you will want to use the rnd function, this creates a number between 0 and 1 (not including 1)
so to get a number between 1 and 6 you would do
When you wanted to choose which form or msgbox you wanted to display you could wither use an array, or use a select case statement:
VB Code:
Select Case MyRNDNo
Case 1
'display answer 1
Case 2
'display answer 2
~~~
~~~
End Select
if you want it to be truly random put this line
in before you call Rnd
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
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
|