hi,
how to calculate a elapsed time,
when i load the form and i do some stuffs and then when i press on one button then it should show the amount of time in one textbox ( from form loading to clicking of button).
please help me...
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Nov 3, 2014, 2:10 AM EST
If that's the case, then replace this line:
textBox1.Text = (DateTime.Now - startTime).ToString(@"hh\:mm\:ss");
with these two:
VulpesRank #55 · 29.2K reputationPosted Oct 31, 2014, 3:33 AM EDT
Wim SturkenboomRank #2,527 · 554 reputationPosted Nov 2, 2014, 9:00 PM EST
ERROR:No overload for method 'ToString' takes 1 arguments
[/quote]
I've copied the code and it compiles (and runs) fine. Check the line where the error occurs to make sure it matches what Vulpes posted.
Guest UserRank #816 · 2.8K reputationPosted Oct 31, 2014, 2:10 AM EDT
raju patil52 reputationPosted Oct 31, 2014, 3:13 AM EDT
raju patil52 reputationPosted Oct 31, 2014, 4:50 AM EDT
how to get it in hh:mm:ss
Guest UserRank #816 · 2.8K reputationPosted Oct 31, 2014, 4:58 AM EDT
raju patil52 reputationPosted Oct 31, 2014, 5:06 AM EDT
raju patil52 reputationPosted Oct 31, 2014, 5:08 AM EDT
raju patil52 reputationPosted Nov 2, 2014, 1:31 AM EST
VulpesRank #55 · 29.2K reputationPosted Nov 2, 2014, 4:08 AM EST
raju patil52 reputationPosted Nov 2, 2014, 6:50 PM EST
Peter Abbasi32 reputationPosted Feb 29, 2024, 8:11 PM EST
Sorry for necro posting, but I've been searching for weeks now but there is not much documentation on using C# in PowerPoint _during_ a Presentation in Slideshow View. How would I implement the timer that appears in the comments here such that it would display continuously across all slides. Let's say I have a textbox named "timer" that I have ensured appears on ever slide. Is there a way to display the slideshow's running time, such that changing slides has no effect on the value inside that textbox named "timer"? Ideally it would start when the show starts, and continue running for the duration of the show.