Solved

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

Posted on 2008-06-25
2
996 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
Comment Utility
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
Comment Utility
I've no idea how to do this

:(

but thanks anyway.

Roberto
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 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

14 Experts available now in Live!

Get 1:1 Help Now