ADXForm Flickers and Outbox Selects

Add-in Express™ Support Service
That's what is more important than anything else

ADXForm Flickers and Outbox Selects
 
David Ing




Posts: 56
Joined: 2006-06-27
Hello!

In my add-in I bring up an ADX Extension Outlook subpane. Depending on if the user has toggled it on (I remember a setting) the ADXForm is shown or not shown at startup. I've been using the ADXOlFormsCollectionItem.Enabled property to control that.

Here's some problem I have at the moment that I could do with some help with please:

(1) When Outlook starts up and the main Explorer initializes for the first time the ADXForm seems to make a refresh and calls Explorer->Activate around about 5 times. This causes the Outlook window to flicker for a few seconds before the ADX subpane form is first shown. It also calls the ADXOlForm constructor 5 times too. This slows down startup and looks bad.

(2) If I called the .Enable = true on the ADXOlFormsCollectionItem instance (say the user now wants to turn 'on' the form with a CommandButton if it was off) then often the current Explorer folder is changed to the 'Outbox' regardless of where they were in the folder hierarchy.

Am I using the .Enable on the ADXOlFormsCollectionItem inappropriately, or is there a better way to dynamically show/not show the ADXForms at run-time?

Thanks for any help.
Posted 12 Jul, 2006 06:09:49 Top
Fedor Shihantsov


Guest


Hello David,

The ADXForm constructor is called only once - I've checked this.
May I look into your initialization code?
Can you send me the code of AddinInitialize or (and) AddinStartupComplete?

Note: Whenever you change any ADXOlFormsCollectionItem?Â?Ð?és properties, ADXOlFormsManager removes all forms, creates a new form for the current folder. If you need to change more than one property without refreshing, you should use ADXOlFormsManager.LockUpdates and ADXOlFormsManager.UnlockUpdates methods.

As for the Outbox folder: To programmatically update a folder's properties one needs to select another folder and then reselect the first one. We use the Outbox folder as this "another folder". But we always return to the current folder. So I'm bewildered. Do you run any code in the BeforeFolderSwitch event? Also, please, tell me versions of Outlook, Visual Studio, Add-in Express, ADX Extensions.

[QUOTE]Am I using the .Enable on the ADXOlFormsCollectionItem inappropriately, or is there a better way to dynamically show/not show the ADXForms at run-time?[CODE]
Yes, it is the correct way.
Posted 12 Jul, 2006 08:31:57 Top
David Ing




Posts: 56
Joined: 2006-06-27
Note: Whenever you change any ADXOlFormsCollectionItem?Â?Ð?és properties, ADXOlFormsManager removes all forms, creates a new form for the current folder. If you need to change more than one property without refreshing, you should use ADXOlFormsManager.LockUpdates and ADXOlFormsManager.UnlockUpdates methods.


Ah - I missed that - oops, it all makes sense now. Thank you Fedor!

What was happening was that I wasn't locking for updates and the FormsManager was recreating a *lot* of things as the new Explorer instance comes up. I counted the properties that I set and it did correspond with the recreations I was seeing.

Now I've wrapped the forms updates in a LockUpdates/UnlockUpdates block it works very well. I can't recreate the Outbox switch though (which is good :D )

Thanks for your help.
Posted 12 Jul, 2006 09:11:35 Top
David Ing




Posts: 56
Joined: 2006-06-27
Btw, I wanted to add, you guys offer great support - I've used a lot of components/frameworks over the years, and Afalinasoft's is some of the best I've seen. Thanks.
Posted 12 Jul, 2006 09:27:02 Top
Esteban Astudillo


Guest


This is a little bit off topic, but is there something similar to LockUpdates for CommandBars?

I'm having a similar flickering issue when updating my toolbars dynamically. I tried disabling the toolbar before the update but didn't make any difference. Making it not visible worked, but makes the whole Explorer window to "jump up and down" as Outlook reclaims the space used for the toolbar and then opens the space again when visible.

How can I prevent updating the toolbar until I finish loading all the buttons in it?

Thanks in advance
Posted 12 Jul, 2006 11:51:21 Top
logikonline




Posts: 35
Joined: 2006-04-14
I too get the Outbox flipping occasionally...

I change many properties with the LockUpdates - but have been unable to figure out how to refresh the current view once all is loaded. The only way to view the new regions is to move from one folder to another to show the panels.

I also noticed the calendar pane is beginning to come in undersized once more. I saw this with 2002 before - it is fine once I resize the screen - but is not very proferssional work-around.

Has anyone figured out how to get around this?
Is there a refresh screen command or function?

regards,
Dave
Posted 18 Jul, 2006 05:35:11 Top
Fedor Shihantsov


Guest


Hi,

Use code without LockUpdates and UnlockUpdates for hiding and showing a form.

adxOlFormsManager1.Items[0].Enabled = false; Or adxOlFormsManager1.Items[0].Enabled = true;

Whenever you change any ADXOlFormsCollectionItem?Â?Ð?és properties, ADXOlFormsManager removes all forms, creates a new form for the current folder if the corresponding item is enabled.

This method works for Explorer forms.
Note, an Inspector form will reappear only after Inspector reopening.
Posted 18 Jul, 2006 10:58:22 Top