Forms and Controls Scaled Differently on User's Machine than Developer Machine

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

Forms and Controls Scaled Differently on User's Machine than Developer Machine
 
Abdullah Alharbi




Posts: 5
Joined: 2020-02-05
We are developing an Excel Com-Addin with multiple userforms. All userforms show scaling issues when testing on a devise with high resolution.
Following is a form at design time as well as the developer's machine and the user's machine view:
Designing the form:
[img]https://drive.google.com/file/d/18SieSc3T7IXxVxa4Bybu_XnMOMggntN7/view[/img]

Developer's machine resolution:
[img]https://drive.google.com/open?id=1D3Xqg92Ucib4aWzCGSXL6_usfY5qcwb6[/img]
Developer's machine form view:
[img]https://drive.google.com/open?id=11OSbEDqscmkmHCzLzK3Kb7_ezbvE_B2g[/img]

User's machine resolution:
[img]https://drive.google.com/open?id=1T1QFO8FZqVjwybkoo9_XmEfB_4wAHqno[/img]
User's machine form view:
[img]https://drive.google.com/open?id=1O5uquXugWv7_HeXjPnoAcnrVD8AlSFTN[/img]

I tried drawing the controls at run time but this problem is still persistent.

Any help would be greatly appreciated.

Abdullah
Posted 05 Feb, 2020 19:59:01 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Abdullah,

You should scale the form and controls using the methods that you used before Microsoft introduced support for multi-DPI configurations; say, you can set AutoScaleMode=DPI on your form. This will work unless you move your form between monitors in a two-monitor configuration and the monitors have different DPIs. In the latter case, check https://www.add-in-express.com/forum/read.php?FID=5&TID=15006&MID=77230#message77230.


Andrei Smolin
Add-in Express Team Leader
Posted 06 Feb, 2020 04:42:23 Top