Nolanc
asked on
Show Running Time In VB.NET MDI Status Bar
Hi
In my VB.NET MDI Windows Application I have a Status Bar with a panel named StbTime. I wish to show the correct time (All the time) in this panel. What is the easiest way of doing this please. For example StbTime.Text = TimeOfDay is useless.
I am using Visual Studio 2008 running under Windows XP Pro.
Many thanks.
In my VB.NET MDI Windows Application I have a Status Bar with a panel named StbTime. I wish to show the correct time (All the time) in this panel. What is the easiest way of doing this please. For example StbTime.Text = TimeOfDay is useless.
I am using Visual Studio 2008 running under Windows XP Pro.
Many thanks.
ASKER
Hi kaufmed
I was hoping that you would provide me with some code to achieve this. However, let me continue searching the Internet for code of this nature after which I will get back to you.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Savant
Thank you. It works beautifully.
Thank you. It works beautifully.
ASKER
Hi Savant
I merely replaced your statement No. 4 with my statement as follows: StbTime.Text = TimeOfDay. It works perfectly.
Thanks
Nolan
I merely replaced your statement No. 4 with my statement as follows: StbTime.Text = TimeOfDay. It works perfectly.
Thanks
Nolan
Well yes, in and of itself it is useless as I'm sure you found out, it will only update whenever the section of code you place that in is executed (e.g. a button being clicked). What you need is that code and a timer to fire that code at some defined interval (e.g. every second). Place that code inside of a Tick handler and start the timer when you're form loads--you should then have better results.