Hi...I want to get the different random number for each time when the application is run. For example : When i run the application, if i got 3 as the random number for the first time then when i close and open the application again i want to get number expect than 3 as the first number...If anyone can than please help me ..it's really urgent..
how to get each time different number while running application in vb6...
Collapse
X
-
I think you will have to store the used numbers in a database, or at least write them to a text file, then open the DB /file at every run, load numbers into an array then check against the array -
dear,Hi...I want to get the different random number for each time when the application is run. For example : When i run the application, if i got 3 as the random number for the first time then when i close and open the application again i want to get number expect than 3 as the first number...If anyone can than please help me ..it's really urgent..
You can also just write it to a file and load it in an array when you start the program.
attached is an example ?
br,Comment
-
As already suggested you need to store all the already generated / used numbers somewhere. Preferable store in a database table.Comment
Comment