By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,107 Members | 1,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,107 IT Pros & Developers. It's quick & easy.

Status Bar Counter

P: n/a
Hi everyone,
I was just wondering if anyone could help me. I am writing a small win32
app using C#/.net. When something is executed, I want to put in a
counter which counts up how long the process is taking. It can either be
in the status bar or in the window itself. Can anyone help?
Thank you
Francis
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Francis,

Just place a status bar in your window. It will dock itself to the
bottom, and you can update the text as you wish.

For your process, when it starts, note the time it starts. Then, start
a timer that fires say, every second. In the event for the timer callback,
you can take the current time, and subtract the time that your process
started and then update the status bar text with that.

It won't be super-accurate, but it should serve your needs just fine.

Don't forget to stop your timer when the process ends.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Francis" <f@f.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi everyone,
I was just wondering if anyone could help me. I am writing a small win32
app using C#/.net. When something is executed, I want to put in a counter
which counts up how long the process is taking. It can either be in the
status bar or in the window itself. Can anyone help?
Thank you
Francis

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.