Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

StopClock

Posted on 2003-03-16
8
Medium Priority
?
147 Views
Last Modified: 2010-05-01
I need to record a sports match, and i would like to calcualate the two teams possession times AND half of play(i.e. which half the ball is in.)

I have the 2 sets of 2 option buttons.

What I need is 1 stopclock (not the actual time), and a way to add the total time intervals for both sets of data, Possession Times and Areas of Play times for the 2 teams involved.

i need to be able to pause the stopclock, and be able to make slight adjustments occasionally (i.e. move the clock back 3 seconds.)

thanx
0
Comment
Question by:GavPrior
8 Comments
 

Expert Comment

by:tat83
ID: 8150404
u can use a variable to store the pause time(time when the stop clock is click)
and after the match is resume increase the time by using a timer control
0
 

Expert Comment

by:tat83
ID: 8150428
example
set timer interval to 1000 which is equivalent to 1 second
on global declaration
dim matchtime as integer
on form load
matchtime=0
timer1_timer()
matchtime=matchtime+1
endsub
cmdstop_click()
timer1.enabled=false
endsub
then u need to convert the match time to time format
hope it help u
0
 

Expert Comment

by:tat83
ID: 8150431
example
set timer interval to 1000 which is equivalent to 1 second
on global declaration
dim matchtime as integer
on form load
matchtime=0
timer1_timer()
matchtime=matchtime+1
endsub
cmdstop_click()
timer1.enabled=false
endsub
then u need to convert the match time to time format
hope it help u
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:tat83
ID: 8150486
and
cmdresume_click()
timer1.enabled=true
endsub
to convert the integer to time format
try this
minute = matchtime/60
second =matchtime - (minute*60)
then
txttime=minute & ":" & second
i never try this code
so i dun know will it work or not
but i hope it help u
0
 
LVL 11

Accepted Solution

by:
rdrunner earned 240 total points
ID: 8150493
Look at the timer function. It will give you the time in seconds after midnight

You need several variabels here...
(those are all arrays here)

nTotals() = for each type you want to measure
nClick() = stores the last time "start" was clicked for each group...

and several textboxes and buttons ...

I would use only one button per group (for both start and stop)

a button click could look like this

if nClick(1) = 0 then '1st click to start
   nclick(1) = timer
   command1.caption = "STOP"
else 'click to stop
   ntimer(1) = ntimer(1) + timer - ntimer(1)
   text1.text = ntimer(1)
   command1.caption = "Start"
end if
0
 

Expert Comment

by:CleanupPing
ID: 8900023
GavPrior:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
LVL 6

Expert Comment

by:GPrentice00
ID: 8956480
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

-->PAQ - with points refunded

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

GPrentice00
EE Cleanup Volunteer
0
 
LVL 11

Expert Comment

by:rdrunner
ID: 8957236
Whats wrong with my answer?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month12 days, 5 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question