'program underconstuction
-------------------------------------------------------
Option Explicit
'setting variables for player 1,2,3,4
'setting for players score
Dim Plyr1Scr As Integer
Dim Plyr2Scr As Integer
Dim Plyr3Scr As Integer
Dim Plyr4Scr As Integer
'setting intCnt
Dim intCnt As Integer
Dim intQ As Integer
Dim i As Integer
Dim q As Integer
'setting for players name
Dim Plyr1 As String
Dim Plyr2 As String
Dim Plyr3 As String
Dim Plyr4 As String
-------------------------------------------------------
Private Sub Command1_Click()
'incrementing player 1's score and displaying its value
Plyr1Scr = Plyr1Scr + 5
Label5.Caption = Plyr1Scr
End Sub
-------------------------------------------------------
Private Sub Command2_Click()
'incrementing player 2's score and displaying its value
Plyr2Scr = Plyr2Scr + 5
Label6.Caption = Plyr2Scr
End Sub
-------------------------------------------------------
Private Sub Command3_Click()
'incrementing player 3's score and displaying its value
Plyr3Scr = Plyr3Scr + 5
Label7.Caption = Plyr3Scr
End Sub
-------------------------------------------------------
Private Sub Command4_Click()
'incrementing player 4's score and displaying its value
Plyr4Scr = Plyr4Scr + 5
Label8.Caption = Plyr4Scr
End Sub
-------------------------------------------------------
Private Sub Form_Load()
'setting initial values of player's score into 0
Plyr1Scr = 0
Plyr2Scr = 0
Plyr3Scr = 0
Plyr4Scr = 0
'setting the display into 0
Label5.Caption = "0"
Label6.Caption = "0"
Label7.Caption = "0"
Label8.Caption = "0"
'for the players 1,2,3,4 name
Plyr1 = InputBox("Enter the name of Player 1")
Plyr2 = InputBox("Enter the name of Player 2")
Plyr3 = InputBox("Enter the name of Player 3")
Plyr4 = InputBox("Enter the name of Player 4")
'putting the player 1,2,3,4 name into the label
Label1.Caption = " " & Plyr1
Label2.Caption = " " & Plyr2
Label3.Caption = " " & Plyr3
Label4.Caption = " " & Plyr4
Label12.Caption = " "
Label13.Caption = " "
'setting time interval for the timer
Timer1.Interval = 1000
'calling the function Start
StartTimer
Func0
For i = 1 To 3
q = i
Next i
End Sub
---------------------------------------------------
Private Sub StartTimer()
Timer1.Enabled = True
intCnt = 6
For i = 1 To 3
Next i
End Sub
---------------------------------------------------
Private Sub Func0()
Label13.Caption = "HELLO"
End Sub
---------------------------------------------------
Private Sub Func1(q)
If q = 1 Then
Label13.Caption = "HI"
Label12.Caption = " "
End If
If q = 2 Then
Label13.Caption = "WAZUP!"
End If
If q = 3 Then
Label13.Caption = "HOW RU?"
Label12.Caption = " "
End If
End Sub
---------------------------------------------------
Private Sub Timer1_Timer()
If intCnt = 0 Then
'Call the function here
Func1 (q)
Else
intCnt = intCnt - 1
Label12.Caption = intCnt
End If
End Sub
this is the code that i'm working of...
i'm having problem about plz...somebody plz help ne...
i am making a quiz bee program that everytime a certain
set of time(for ex.30) is reached, it then calls a 2nd function that
will display the 2nd question...and so on and so forth...
hope that someone here can help me...

New Topic/Question
Reply




MultiQuote




|