Print Page | Close Window

StatusBar Date and Time

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=4019
Printed Date: 21 June 2025 at 3:33pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: StatusBar Date and Time
Posted By: Juzzy
Subject: StatusBar Date and Time
Date Posted: 17 April 2006 at 7:25pm

When will Date and Time types be added to the StatusBar objects?

Currently there is CapLock, NumLock and (the ever useful) ScrollLock, but unlike even the basic VB6 standard statusbar, there is no Date or Time (or Kana) objects.

All your competitors have this and as I said, even the normal VB6 control has it.

I don't want to use the others or the standard VB6 one, because I want the extra functionality that CodeJock offers, and I don't want to have to set my own timer to handle it either.




Replies:
Posted By: Juzzy
Date Posted: 19 April 2006 at 11:29pm
Anyone?


Posted By: gshawn
Date Posted: 20 April 2006 at 2:05am

In your CommandBars_Update event, just do:

StatusBar.Pane(1).Text = Now  'displays date and time
StatusBar.Pane(2).Text = Date 'displays date
StatusBar.Pane(3).Text = Time 'displays time

Is it really worth adding extra functionality to the control when this can be handled with 1 line of code? :)



Posted By: Juzzy
Date Posted: 21 April 2006 at 1:52am

How often does the CommandBars_Update event get fired?

If my app is just sitting there with no interaction, will it get updated?

Is



Posted By: gshawn
Date Posted: 21 April 2006 at 6:35am

By default it is fired every 100ms, although you can modify the UpdatePeriod property if this does not suit your needs.

Try adding a Debug.Print Timer, "CommandBars_Update event fired!" to your code and you can see how it works.



Posted By: barianto
Date Posted: 01 May 2006 at 1:32am
Yes, the time on statusbar won't update.
Do we have to set our own timer?


Posted By: gshawn
Date Posted: 01 May 2006 at 4:08am

You don't need to set a timer, just use the CommandBars_Update event.... Read my post above for a sample.



Posted By: barianto
Date Posted: 01 May 2006 at 4:24am
sorry, i miss that one... :(

you're right



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net