|
-
Aug 7th, 2000, 10:27 PM
#1
Thread Starter
Frenzied Member
I am using ms agent, and every time it moves, I want a diffrent message to apear random
please help
thanks in advance
NXSupport - Your one-stop source for computer help
-
Aug 8th, 2000, 12:36 AM
#2
This will generate a random message:
Code:
Private Sub Command1_Click()
Randomize
retVal = Int((5 * Rnd) + 1)
If retVal = 1 Then MsgBox "Message #1"
If retVal = 2 Then MsgBox "Message #2"
If retVal = 3 Then MsgBox "Message #3"
If retVal = 4 Then MsgBox "Message #4"
If retVal = 5 Then MsgBox "Message #5"
End Sub
Get the point? Hope this helps.
-
Aug 8th, 2000, 07:30 AM
#3
transcendental analytic
YOu could use Choose like this:
Code:
Msgbox Choose(int(Rnd*5+1),"M1","M2","M3","M4","M5")
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Aug 8th, 2000, 11:34 AM
#4
Thread Starter
Frenzied Member
ok, thanks to both for your help
NXSupport - Your one-stop source for computer help
-
Aug 8th, 2000, 11:43 AM
#5
If you need more information about messaggeboxes, Check it out. 
http://forums.vb-world.net/showthrea...threadid=25670
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
|