Working on Who Wants To Be A Millionaire Project in VB6 [NEED HELP]

vb6 , visual basics 6 , who wants to be a millionaire , control arrays , who wants to be a millionaire vb6 , millionaire , control arrays vb6 , travis , help in vb6 , help me , visual , basics , 6 , gagne , who wants to be a millionaire control array London, Canada
  • 11 years ago
    Okay so yeah, I am currently creating a Millionaire game through vb6, and notepad for questions and the lifelines. What im stuck on right now is creating a control array of the displayed money. like this. 1,000,000 500,000 250,000 125,000 64,000 32,000 and so on to 100 What im stuck with is corresponding each number to the current question. So when Im on question 1, the $100s back color will turn yellow. If the user gets the question wrong then game over. But if they get it right, it goes on to the next question and lights up the next $ amount, the $200. NOW the tricky part. I have to do this without copying code. Thats where im stuck. I had this one idea of just using a command button called CMDSubmit, everytime the user was right, my variable QuestionNum would go like this: QuestionNum = QuestionNum +1 If QuestionNum = 1 then Lbl100.backcolor = vbyellow ElseIf QuestionNum = 2 then Lbl200.backcolor = vbyellow and so on End if. My main question is, how can I get all the cash amounts to light up with the corresponding question the user is on WITHOUT copying code like that. I know its a control array type business. Thanks for your time :) email me :D
  • 11 years ago
    Think you want to do something like this with the Submit button code: Dim iLabel As Integer Dim oLabel As Label mvarQNumber = mvarQNumber + 1 For iLabel = 1 To mvarQNumber Set oLabel = Me.Controls("Label" & iLabel) oLabel.BackColor = mvarYellow Next Where mvarQNumber is declared at module level and contains the current question number that you're on. Obviously you're going to need to include some validation to check that the answer given is correct. This also assumes that mvarQNumber starts at 1.
  • 11 years ago
    Hi i'm a 15 year old; and I'm trying to create a simple version of Who wants to be a millionaire? and I'm very lost , any guidance/ advice would be appreciated!!:) if you can help me, please e-mail @ Thank You!! :)

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Anyone who considers arithmetic methods of producing random digits is, of course, in a state of sin.” - John von Neumann