Not sure why time variables are required..... I'd simply use integers (cast the time function or date function to int) and have a timer that updates once a minute (or second). A Few if's a few minute = minute + 1's and you should be good to go. Just remember, that the timer control isn't 100% accurate, and after a few days, the time it keeps and the time it really is, may be off. Not a big deal though, unless you plan to work days at a time straight on through. In which case you would need time precision.
Actually my program is using a timer to accumulate seconds for an operation. I want to display it in a "00:00:00" format, save the accumulated time and when I enter that operation again, to add the new time used to the original accumulated time. I will end up with thousands of seconds. I am not partial to the saving of seconds in my array and file but it does seem to work for what I have programmed so far
1) start a project for 180 seconds, display 3 minutes (00:03:00) and store the 180 seconds.
2) go off to another operation for 600 seconds, display 10 minutes (00:10:00) and store the 600 seconds.
3) return to the original operation for another 120 seconds and display 5 minutes. (00:05:00)
While I am in the operation, I will be showing the seconds as they tick off again in "00:00:00" format.
I have used many lines to do the math and to show "00" format for seconds, minutes, hours less than 10 (6 minutes as 06 minutes)
I was hoping there would be a function that will show 00:06:24, 00:06:25, 00:06:26... and be able to continue in hours after 24 hours have lapsed. 23:59:58, 23:59:59, 24:00:00, 24:00:01...
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...