Creating a Q&A cue card like program

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • macska
    New Member
    • Jun 2007
    • 1

    #1

    Creating a Q&A cue card like program

    Hi,

    I haven't coded anything in VB in years and I'm having trouble figuring out how to do the following:

    I want to randomly pick an item from a numbered list (text file), where one of the two items associated to the number in the list will be displayed and the user has to then type in the other item, which will then be matched and tell them if it is right or wrong (and show the correct answer).

    I'm thinking that a number has to be randomly generated from the list of numbers in the file and then the appropriate line in the file has to be read and the items in the line displayed, but I can't for the life of me remember how to do any of this.

    If anyone could point me in the right direction, it would be greatly appreciated.

    Thank you :)
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Well for a start, unless the list is very long, it's probably simpler to read all of them into an array, then randomly pick things from the array.

    As for reading the file, there are a couple of sample code snippets in the index at the top of the VB forum that might help.

    Comment

    Working...