PDA

View Full Version : VB newbie! Random forms


cykrider
06-05-2001, 12:14 AM
I'm making a program on VB 6.0 that will test me on various information. The problem is I want the questions to come up in a random order. I put each question on a seperate form (can you think of any other way of doing this, it might take forever if I have 100 questions!) and I'd like a random form to come up instead of asking the same questions in the same order. Thanks.

Azura Borealis
06-05-2001, 01:49 AM
Try Looking Here (http://www.insteptech.com/vbtips.htm)

I am the worlds worst when it comes to describing anything technical, So I'll spare you the trauma of attempting to understand my jibberish.

:D

hardcore
06-05-2001, 04:15 AM
I recommend using a database with all of the questions in it, numbered 1 - 100, then generating the non-repeating, random sequence of the questions at runtime. In other words, generate a random number between 1 - 100, and this will be the first question. Then generate a number between 1 - 99, and this will be the second. Continue this loop until you have finished the question number sequence.

I would use one form with a scroll bar, much like a web page. However, this would require a lot of scrolling on the user's part, especially for 100 questions. If you only want one question on a form at a time, just use 1 form, but keep changing the question on the form at runtime after each question is answered.