CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2002
    Posts
    195

    Question Need snippit for Random Order

    Okay this should be a simple one but all I can come with is a complecated solution.

    This is whay I've got

    Code:
    Dim Question as string
    Dim Answer(4) as string
    
    Text1.Text=Question
    Text2.Text=Answer(0)
    Text3.Text=Answer(1)
    Text4.Text=Answer(2)
    Text4.Text=Answer(3)
    What I want to do is place the Answers in a random order. Any ideas?

  2. #2
    Join Date
    Jan 2002
    Posts
    195

    Re: Need snippit for Random Order

    Oh one other thing I have to be able to know which answer is in which text box for when the user answers the Quesion By pressing one of 4 command buttons.

  3. #3
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Need snippit for Random Order

    Have a look at this
    http://www.freevbcode.com/ShowCode.Asp?ID=4451

    You could use the tag property of the text box (assuming it still exists in .net) to hold the number of the answer in the text box.
    Always use [code][/code] tags when posting code.

  4. #4
    Join Date
    Jan 2002
    Posts
    195

    Re: Need snippit for Random Order

    I like the Tag idea I for got all about that property. Couple that with the Rnd function and a nestled lop I think I'll be able to make this work.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured