Solved

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

Posted on 2008-06-25
2
997 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

930 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now