Dim randomclass as new Random
Select Case randomclass.next(0,3)
Case 0: msgbox1
Case 1: msgbox2
Case 2: msgbox3
Something like that
sorry guys, but what is the code if when button1 is clicked and it randomly picks what to say. say i have 3 difference msgboxes. i only want one to show but i want the program to randomly pick which one to show.
is that possible?
Need Help With Coding or Something??? MSN me
zmansquared@hotmail.com
I am the one and only Microsoft Fag!!!
Quote:
Originally Posted by Arhk
All games should be hacked, if we don't do it someone else will. Hackers force the progress, of better programming methods.
~
Take this Pic everyone!
next-
Dim randomclass as new Random
Select Case randomclass.next(0,3)
Case 0: msgbox1
Case 1: msgbox2
Case 2: msgbox3
Something like that
w8 r u making a spammer???
Press Thank You[IMG]https://i45.tinypic.com/2hg8w0n.jpghttps://img1.UploadScreensho*****m/images/main/2/3203234450.jpg[/IMG]
My Releases
Injector 3G
Injector 2G
Injector 1G
Super Spammer
CA Cleaner
My Tutorials
How to Make a real Injector(PerX)
How to Make a Calculator(leeched)
One more thing to keep in mind when working with VS (Visual Studio) is the term Pseudo Random, What Pseudo Random means (in this case) is you will never get a true random number when using RndCode:Dim i As Integer i = Rnd(1) * 3 + 1 Select Case i Case 1 MsgBox("msg1") Case 2 MsgBox("msg2") Case 3 MsgBox("msg3") End Select
Ex: Every time you start the program you will notice that the series is always the same.
The work around for that is by calculating a number on your system that is always different (or more different) System Time, Memory Speed , CPU speed, etc.
That's more of a (good to know) piece of information, and has no real baring here as you only need a small number, but the problem will present itself regardless. I will usually add a label starting at 0 (when in need for a "quick" fix) and have it's number increase by 1 every second and make calculations based off that number to ensure a more random result.
Last edited by NextGen1; 02-13-2010 at 08:57 PM.
zmansquared (02-13-2010),Zoom (02-14-2010)
Thanks it works
Need Help With Coding or Something??? MSN me
zmansquared@hotmail.com
I am the one and only Microsoft Fag!!!
Quote:
Originally Posted by Arhk
All games should be hacked, if we don't do it someone else will. Hackers force the progress, of better programming methods.
~
Take this Pic everyone!
next-