?
Solved

StopClock

Posted on 2003-03-16
8
Medium Priority
?
138 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month8 days, 16 hours left to enroll

765 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