TheNewCOMAddin Dev
Guest
|
Hi,
Our Outlook Addin is working fine on systems with 100 / 150 and 175% Scaling however, when it becomes 200% + and clients use it on Full HD + : 2K and 4K monitors, the controls / buttons appear mangled.
We tried putting the "AutoScaleMode" = DPI. However this does not seem to resolve the issue.
We looked at some of the blog posts regarding multi monitor and wondering if this is what we need to do to cater to this high DPI issues :
https://www.add-in-express.com/creating-addins-blog/2018/05/08/add-in-express-multiple-dpi-monitors/
Any examples for this specific to Outlook with ADXFormCollection reading pane / inspector elements would really help.
Thanks,
-Jatin |
|
Andrei Smolin
Add-in Express team
Posts: 18821
Joined: 2006-05-11
|
|
TheNewCOMAddin Dev
Guest
|
Hi Andrei,
If I understand correctly we have and need to handle 2 issues :
1)On the primary monitor when its high resolution i.e 200%+ Scaling on 2k / 4k resolution there is distortion.
2)In a multi monitor setup we need to consider DPI changed event and scale all controls in the form.
Just to let you know what happens (Point 1) is till certain resolution.. all buttons in my form look fine the moment we scale up.. the form we added to display via ADXFormManager in reading pane (top) gets distorted and the button kind of cut off.
Our project is based on 4.6 .Net Framework : If I understand correctly this link https://docs.microsoft.com/en-us/dotnet/framework/winforms/high-dpi-support-in-windows-forms considers that application is 4.7 based ? Is that accurate ? What are the solutions for 4.6.
I believe the UpdateDPI part is solution for the 2) however, we seem to have issues for 1) what needs to be done as a solution for 1) ?
Thanks again for the help,
- Jatin |
|
Andrei Smolin
Add-in Express team
Posts: 18821
Joined: 2006-05-11
|
Hello Jatin,
You shouldn't choose what DPI or monitor configurations to handle. The ADXDPIChanged event (it provides the dpi and dpiScale parameters) will occur whenever you need to scale your controls. The UpdateDPI method which you found in the example, works correctly for controls that allow scaling. If you have a control(s) that doesn't let you scale it (say, System.Windows.Forms.CheckBox, ComboBox, RadioButton, etc. may scale partially; other controls may have other problems; WPF scales okay), you'll have to find your way out of this. You may need to go as far as to create a custom control. This isn't a simple process. We recommend that you do this step by step, preferably by debugging a small sample project.
Note that you may need to check and set the context; see https://docs.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows.
Hope this helps.
Andrei Smolin
Add-in Express Team Leader |
|