![]() |
commandbar_update |
Post Reply ![]() |
Author | |
LittleJK ![]() Senior Member ![]() ![]() Joined: 13 April 2006 Status: Offline Points: 168 |
![]() ![]() ![]() ![]() ![]() Posted: 29 May 2007 at 11:25am |
Is there anyway around using commandbar_update? We are finding that the update event gets fired all the time when the form is opened. we are wondering if there is a way to by pass commandbar_update or to slow it down/less calls.
Thanks |
|
![]() |
|
apuhjee ![]() Senior Member ![]() ![]() Joined: 02 September 2005 Location: United States Status: Offline Points: 130 |
![]() ![]() ![]() ![]() ![]() |
I would really appreciate an answer to this question.
Maybe I'm missing something here, but it seems like this polling model is a step backwards from the modern event model.
What are the benefits?
Thanks ~ jp
|
|
I like mathematics because it is not human and has nothing particular
to do with this planet or with the whole accidental universe — because, like Spinoza's God, it won't love us in return. |
|
![]() |
|
gshawn ![]() Senior Member ![]() Joined: 04 October 2004 Status: Offline Points: 227 |
![]() ![]() ![]() ![]() ![]() |
Look into the UpdatePeriod property.
|
|
![]() |
|
gshawn ![]() Senior Member ![]() Joined: 04 October 2004 Status: Offline Points: 227 |
![]() ![]() ![]() ![]() ![]() |
The benefit is that you can have all of your commandbar status maintenance code in a single method (rather than needing to add code to every single event that an object could fire when its state is modified).
For example, there is no SelChange event for the textbox control. If you have a "Bold Text" button that you only want to enable when some text is selected, you would need to add code to handle at least the keyboard and mouse events.
With what you call the "polling model" however, you only need to add a single line of code to the CommandBar_Update event:
Hope this helps!
|
|
![]() |
|
apuhjee ![]() Senior Member ![]() ![]() Joined: 02 September 2005 Location: United States Status: Offline Points: 130 |
![]() ![]() ![]() ![]() ![]() |
Thanks for pointing that out gshawn. It does help.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |