Andrei Smolin

Problems with ADXTaskPane are solved in Add-in Express for Office v.9

Hello Developers,

Recently, our mail boxes became overwhelmed with a flow of reports describing how Add-in Express panes appear outside the host application’s window. This is a manifestation of how the code calling the SetParent Windows API function can be incompatible with the recent Windows API change supported by Office 2016: Microsoft introduced DPI contexts and related API functions to let you get/set the current context. Now, to call SetParent, you must set the DPI context corresponding to the DPI context of the target window. Version 8 of Add-in Express for Office (.net and VCL) doesn’t set the required DPI context when embedding your ADXTaskPane in the hosts’ windows and this is the direct cause of the issue. Affected are the Add-in Express 8 based add-ins running in Office 2016 on Windows 10.

A workaround is to choose the Optimize for compatibility option in Display Settings; see the status bar or File | Options | General. Select this option, restart the Office application and it will use the old Windows API. If Display Settings is missing, the only way for you is to switch to Add-in Express 9.

ADX.NET 9 and ADX.VCL 9 introduced only one feature: support for the Windows API changes above. You may be required to modify your code as we described in Add-in Express adds support for multiple monitors in Office.

Below is a download link for an installer of a sample add-in that demonstrates how an add-in based on Add-in Express 9 behaves in Excel, Word, PowerPoint and Outlook from Office 2000-2016.

Good luck!

Available downloads:

This sample add-in was developed using version 9.1 of Add-in Express for Office and .net:

Sample add-in project (VB.NET and C#)

13 Comments

  • Darryl Jung says:

    Hello,

    Re: http://www.add-in-express.com/files/adx9netsetup/adxnet-v900-b4610-vs-pro.zip

    The version 9 Add-in Express assembly Interop.Outlook.dll (.net for Office) is required to access the new ADXDPIChanged event on AddinExpress.OL.ADXOlForm. It seems that Interop.Outlook.dll only partially ‘overlaps’ the MS assembly Microsoft.Office.Interop.Outlook.dll, so both assemblies are required to be referenced by our solution instead of replacing Microsoft.Office.Interop.Outlook.dll entirely with Interop.Outlook.dll. For instance, the class MAPIFolder appears in both but only in Microsoft.Office.Interop.Outlook.dll does MAPIFolder have the FolderPath field. Likewise, MailItem appears in both but only in Microsoft.Office.Interop.Outlook.dll does MailItem have the PropertyAccessor. Could you please confirm that this is the case? We are wondering why the new Interop.Outlook.dll does not cover the API covered by Microsoft.Office.Interop.Outlook.dll.

    Thank you for your consideration.

  • JP says:

    So for those of us who do not (yet) have a v9 license, given the significant disconnect in basic functionality, we have to purchase the upgrade to use v9?

    It’s been nice to avoid that very reality over time. I recognize upgrading to v9 for 2019 support makes sense – but this isn’t a minor issue and one reason to use the add-in rather than direct programming.

  • Andrei Smolin (Add-in Express Team) says:

    Hello JP,

    Thank you for your feedback. Sorry, we won’t be able to change code in older Add-in Express versions because we only maintain the current version of the code base.

  • Sam says:

    This issue occurs on single monitors as well.

  • Andrei Smolin (Add-in Express Team) says:

    It relates to Windows/Office supporting multiple monitors.

  • Aagam says:

    I have been facing task panes issue for certain machines where the task panes are not placed in their location and the screen freezes once task panes opens up, user cannot perform any operations.
    Is this because of the above DPI changes?

  • Andrei Smolin (Add-in Express Team) says:

    Hello Aagam,

    If the panes were Add-in Express panes, then most probably, the issue that you saw was caused by the DPI changes above.

  • Aagam says:

    Then how am i suppose to fix this issue? As i had speculated this to be machine specific issue of .Net Version, am i supposed to add UpdateDPI changes , because this issue is not occuring for all machines, it is just for specific machine

  • Andrei Smolin (Add-in Express Team) says:

    Hello Aagam,

    The blog we are discussing suggests that you switch to using Add-in Express 9; I’d suggest that you use the latest Add-in Express build.

  • Aagam says:

    Hi Andrei,

    I have already been using addin express v9 latest. What else can be the fix?

  • Andrei Smolin (Add-in Express Team) says:

    Hello Aagam,

    Make sure your project references and your setup project deploys the latest version of Add-in Express assemblies.

  • Andrei Smolin (Add-in Express Team) says:

    Hello Aagam,

    Please use the contact form at https://www.add-in-express.com/support/askus.php to send us a test project reproducing the issue.

  • Andrei Smolin (Add-in Express Team) says:

    @Darryl Jung,

    I’ve very sorry for the delayed response; we failed to check the list of comments requiring our approval. We’ve changed the corresponding workflow to avoid such issue in future.

    > It seems that Interop.Outlook.dll only partially ‘overlaps’ the MS assembly

    That’s because Interop.Outlook.DLL is an interop assembly created for Outlook 2000. You use it when you need to support *all* Outlook versions, from 2000 to the newest 2019. An interop is actually a table mapping public members of Outlook classes to addresses within the COM server type library. Because all Outlook versions support MAPIFolder, in all of them MAPIFolder.Name points to the same address in COM server DLLs of *all* Outlook versions; this is the technical side of backward compatibility.

    As to MAPIFolder.FolderPath, it was introduced in Outlook 2002. This means, it is available in in all interop assemblies except for Interop.Outlook.DLL.

Post a comment

Have any questions? Ask us right now!