Click here to Skip to main content
15,891,621 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
See I am making a code of "Who wants to be a millionaire" is a school work in Visual basic language, I have been doing it for 2 weeks but everything I do only generates more errors (which is normal when programming), the reason for asking for help is that In spite of solving some errors there is one that persists, my code is that 10 forms appear randomly (these contain the questions) what I want to do is to generate one after closing the other, so try to put everything in a "for "But the method randomize within the for, throws me the 10 forms at once, I managed to make the forms not repeated but I can not get them to be one by one after answering a question.

What I have tried:

Put everything in a "for "
Put "Randomize" in a Function
Put "Randomize" in a while and initialize the variable = 0
Posted
Updated 3-Aug-17 5:34am
v2
Comments
Graeme_Grant 1-Aug-17 1:00am    
I would recommend removing your email address unless you want to be spammed...
Graeme_Grant 1-Aug-17 1:01am    
You say that you have 10 forms, does that mean you want the randomizer code to issue random numbers > 0 && < 11?

Also, what language are you working with? Please click on the "Improve question" link and provide more specific information.

Here is a great place to start (with sample code): Random Class - Microsoft [new] Documentation[^]
 
Share this answer
 
You haven't shown us the relevant parts of your code, but at a guess, you probably want to call ShowDialog[^] instead of Show[^].

Show opens the form and returns immediately. ShowDialog doesn't return until the form has been closed.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900