Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Outlook VSTO with new Office High DPI support

We have an Office VSTO add-in for Outlook written in C# and using Windows Forms.

Before a recent Office update, the add-in was rendering just fine. But after Microsoft introduced Office support for high definition displays, many forms started to render blank in Outlook 2016 (MSO / Office 365).

I can fix this inside Outlook by selecting "Optimize for compatibility" in Display Settings on the bottom status bar in Outlook: Display Settings popup

But this is not a tenable solution for our customers, if every user has to do this manually. So I have two questions:

  1. Where in the Windows Registry is this setting located and what value am I required to write to activate "Optimize for compatibility" mode?
  2. How can I make my WinForms add-in work with the new "Optimize for best appearance" mode?

Update

I have discovered that disabling transitions fixed the problem in one form where the controls started appearing after removing transitions. But our most important form still renders blank even after removing all transitions.

I also tried to upgrade the project to .NET 4.7 and enable the new high DPI support for Windows Forms. But that also did not solve the problem.

like image 653
Søren Boisen Avatar asked Sep 20 '18 11:09

Søren Boisen


1 Answers

I can now answer question 1 myself: Outlook 2016 MSO stores the setting under

HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Options

under the name "RenderForMonitorDpi". If this is set to 1, the option is set to "Optimize for best appearance". If set to 0, it will be set to "Optimize for compatibility".

like image 147
Søren Boisen Avatar answered Sep 28 '22 06:09

Søren Boisen