MedVision ad

Help!! Vb6 Major Assesment!!! (1 Viewer)

Mohit7

Member
Joined
Mar 25, 2006
Messages
35
Gender
Male
HSC
2007
I have to set up a quiz program and I need to know how to set up a counter and an array.
I actually need two counters one to count the score and one to count how many questions that have been done or opened.
I also want to know how to show the counter.

Thanks to anyone who helps
 
Last edited:

Affinity

Active Member
Joined
Jun 9, 2003
Messages
2,062
Location
Oslo
Gender
Undisclosed
HSC
2003
Should be pretty straightforward

A counter just an integer variable

Dim counter as Integer

Arrays can be declared along the lines

Dim arr(10,20) as Integer

With displaying the counter you can either use stanard Ascii text (draw a field in the window and then use something along the lines of:
field.value = score )

or you can do some fancy work with graphics

really depens
 

ianc

physics is phun!
Joined
Nov 7, 2005
Messages
618
Location
on the train commuting to/from UNSW...
Gender
Male
HSC
2006
the best way to display a variable in VB6 is to draw a label on the form, and then in the code write:
Code:
label1.caption = variable
(doesnt have to be label1, just whatever you called the label)

hope this helps! :)
 

bipolardragon

New Member
Joined
Nov 22, 2005
Messages
8
Location
NSW
Gender
Male
HSC
2006
Hey man. I did pretty much the same thing. For my MDP for this year, I did a HSC multiple choice tester. The way you want the counter is something like:Dim counter as integerDim numberofquestions as integerGo through your code to where it answers the questionthen have it increment the counterthenIf counter < numberofquestions thendo somethingElse go back to start.Hope this helped.BTW search google for the stuff on random number array. I found a good one in VB6 when I was writing my program. Good luck.PS. If this didnt help or you need more help, dont hesitate to PM me.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top