Solved

countdown timer in hh:mm:ss with on resume function... (vb 2003)

Posted on 2008-06-25
2
1,004 Views
Last Modified: 2009-03-23
Hi Experts,

I'd like to create a winform with a timer value and it will save the timer value e.g. start value = 23 hours 60 min 60 sec to a text file.

1. click button and it saves the start value as text to a .text file.
2. A timer on the winform will count down to 0 (in time to the windows system clock (real-time)

(The reason for the text file is so that if I close the winform for xx hours and open it again, it will resume countdown and deduct the passed time and adjust the timer.) then save the current time to the text file.

3. When the timer gets to 0 it stops counting and performs an action.
4. If I click the button again, it starts the process all over again, but saves an alternative filename.. e.g. textfile2.txt; and so on...

Hope this isn't too difficult.

I've played with timers but this is out of my league.

Regards,
Roberto
0
Comment
Question by:RobertoFreemano
2 Comments
 
LVL 3

Expert Comment

by:GHCS_Mark
ID: 21870735
You need to look at using TimeSpan objects and deduct the DateTime.Now value from your saved DateTime.
0
 

Accepted Solution

by:
RobertoFreemano earned 0 total points
ID: 21941493
I've no idea how to do this

:(

but thanks anyway.

Roberto
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 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