mitchell balsam
Posts: 8
Joined: 2017-01-27
|
Hello, i have found a problem which i'm not sure how to handle but seems to be related to hosting windows forms inside an add-in express region.
I have a region that shows on top of the reading pane in Outlook 'ADXOlExplorerLayout.TopSubpane'
My region contains a windows forms grid (Grid.NET) from https://10tec.com which shows a custom list of messages
When a message is clicked i get the message from the mail store and run this code
MailItem item = store.Session.GetItemFromID(messageData.OutlookEntryId);
Explorer activeExplorer = item.Application.ActiveExplorer();
activeExplorer.ClearSelection();
activeExplorer.AddToSelection(item);
This works, i can see the message displayed on the reading pane but eventually i'm seeing a problem where the reading pane or other parts of the Outlook window are not redrawn correctly
What appears to happen is that the windows messages are somehow lost or redirected by the grid control that is hosted inside the region, if i minimize and then restore the Outlook window i can see it redraw itself
I can also see it redraw if i resize the Outlook window.
Until i do one of the things above, the window remains in an invalid state, showing old content or simply showing white rectangles instead of the controls on that location.
So my theory is that the windows form grid is somehow interfering with the message loop and hijacking messages that the reading pane or the Outlook main window should have received.
In your experience, have you seen something like this before?
Is there anything special or specific i need to do in order to host windows forms controls inside an add-in express region?
This is how i'm setting up my region, which contains the grid.net control:
MessageListViewRegion = new ADXOlFormsCollectionItem();
MessageListViewRegion.ExplorerLayout = ADXOlExplorerLayout.TopSubpane;
MessageListViewRegion.ExplorerItemTypes = ADXOlExplorerItemTypes.olMailItem;
MessageListViewRegion.ExplorerMessageClass = "IPM.Note";
MessageListViewRegion.InspectorLayout = ADXOlInspectorLayout.TopSubpane;
MessageListViewRegion.InspectorItemTypes = ADXOlInspectorItemTypes.olMail;
MessageListViewRegion.InspectorMessageClass = "IPM.Note";
MessageListViewRegion.InspectorMode = ADXOlInspectorMode.Read;
MessageListViewRegion.DefaultRegionState = ADXRegionState.Hidden;
MessageListViewRegion.AlwaysShowHeader = false;
MessageListViewRegion.Splitter = ADXOlSplitterBehavior.None;
MessageListViewRegion.CloseButton = false;
MessageListViewRegion.UseOfficeThemeForBackground = true;
MessageListViewRegion.FormClassName = typeof(VenueMessageGrid).FullName;
this.FormsManager.Items.Add(MessageListViewRegion); |
|
Andrei Smolin
Add-in Express team
Posts: 18823
Joined: 2006-05-11
|
Hello Mitchell,
Could you please check if the issue is reproducible in a simple project with no Grid.NET controls? If the issue is reproducible, please send us this project to the support email address; find it in {Add-in Express installation folder}\readme.txt; please make sure your email contains a link to this topic.
Andrei Smolin
Add-in Express Team Leader |
|
mitchell balsam
Posts: 8
Joined: 2017-01-27
|
I will ask my the developer to send you the working sample. This is really our schedule, please turn around quickly if possible.
Many thanks.. |
|
Andrei Smolin
Add-in Express team
Posts: 18823
Joined: 2006-05-11
|
Mitchell,
Please make it as simple as possible; dealing with a complex project is a nightmare.
Andrei Smolin
Add-in Express Team Leader |
|
mitchell balsam
Posts: 8
Joined: 2017-01-27
|
In writing the sample, we identified the grid control was causing the problem. It's fixed now.. Thanks |
|
Andrei Smolin
Add-in Express team
Posts: 18823
Joined: 2006-05-11
|
Thank you for letting us know!
Andrei Smolin
Add-in Express Team Leader |
|