Thread View: comp.lang.basic.visual.misc
1 messages
1 total messages
Started by Gavin Rooke
Sat, 14 Dec 2002 18:04
General Procedure Problem
Author: Gavin Rooke
Date: Sat, 14 Dec 2002 18:04
Date: Sat, 14 Dec 2002 18:04
52 lines
3090 bytes
3090 bytes
I have the following as a general procedure. The program is for a
snooker/pool club. This bit manages the tables. The way it works is to get
the table number -"num" when the procedure is called when the table is
clicked on the form to begin play...
The problem is every table calls the procedure so when mulitple tables are
being played on the variables only record the last table clicked so all
tables end up displaying the same and wrong price. Is there anyway to set
the variables up using the paramater.
I'm a bit of a newbie, so i aploigise if the mistake is obvious.
Look forward to your response.
Thnanks.
Gavin
------
Public Sub PlayTable(num As Integer)
If lblStatusTable1.Caption = "Member Playing" Then
Dim intResult As Integer
intResult = MsgBox("Are you sure you want to end the game on " & (num) &
"?", vbQuestion + vbYesNo + vbDefaultButton1 + vbApplicationModal, "Start
Game")
If intResult = vbYes Then
lblStatusTable.Caption = "Game Ended"
finish = tmrTable & (num)
lblTableCost.Enabled = True
lblTimeTable.Visible = True
lbltime.Caption = elapsed1 & " minutes"
cost = elapsed * 0.2
lblTableCost.Caption = "�" & cost & "0"
ElseIf intResult = vbNo Then
'Do nothing
End If
End If
If lblStatusTable1.Caption = "Available" Then
Dim intResult As Integer
intResult = MsgBox("You are allocating Table " & (num) & " to a member.
Is this correct?", vbQuestion + vbYesNo + vbDefaultButton1 +
vbApplicationModal, "Start Game")
If intResult = vbYes Then
tmrTable1.Enabled = True
elapsed1 = 0
lblStatusTable1.Caption = "Member Playing"
ElseIf intResult = vbNo Then
'Do nothing
End If
End If
End Sub
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads