|
-
Feb 7th, 2001, 03:29 PM
#1
Thread Starter
New Member
Hi I am a student who just started taking visual basic.
My latest project is an Olympic scoreboard, which has 5 judges labels and 10 cmd buttons. The project calls for the user to hit the first digit and that should be recorded in judge 1' s label and the next digit clicked should go in judge 2's lablel and so on.
So far all I can get is the digit to go in judge 1 lablel
Dim mintScore As Integer
Dim mintAverage As String
Dim mintScore2 As Integer
Private Sub cmdScore_Click(Index As Integer)
Dim NumPressed As Integer
NumPressed = Index
mintScore = 1 + mintScore
lblScore(0) = NumPressed
mintScore2 = lblScore(0) + lblScore(1) + lblScore(2) + lblScore(3) + lblScore(4)
lblAveragescore = mintScore2 / 4
End Sub
Private Sub cmdScore_KeyPress(Index As Integer, KeyAscii As Integer)
Dim NumPressed As Integer
NumPressed = Index
lblScore(1) = NumPressed
End Sub
Private Sub Form_Load()
Dim i As Integer
For i = 0 To 9
cmdScore(i).Caption = i + 1
Next i
For i = 0 To 4
lblJudge(i).Caption = "Judge" & i + 1
Next i
For i = 1 To 10
cmdScore(0) = i
Next i
End Sub
Please help because this is really frustrating.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|