Scaling revint addins using windows form to higher dpi settings

Scaling revint addins using windows form to higher dpi settings

jjesusdelpino
Advocate Advocate
1,031 Views
5 Replies
Message 1 of 6

Scaling revint addins using windows form to higher dpi settings

jjesusdelpino
Advocate
Advocate

Hello, Im facing some troubles using windows with Revit addins in high screen resolution monitors. While in my 1920x1080 the apps is seen like this:

LHF6t.jpg

In other screens with higher resolution is seen like this:

hEMiU.jpg

 

Windows autoscale and deform many controls. I would want my app to be seen the same size in every moniter (even if that implies some blurry stuf in some pcs). I know that this is more a winforms related problem than Revit, but Im wondering if any member of the comunity have faced and solved this before. Im aware about this BuildingCoder post where a similar topic is discussed: 

https://thebuildingcoder.typepad.com/blog/2019/09/scaling-an-add-in-for-a-4k-high-resolution-screen....

 

Proposed solutions are:

- using WPF instead of windows form (this involves rewrite a significant part of code but this is what I will be doing if no one knows another way)

- change some application properties (this can only be done in standalone apps)

- change monitors configuration (I will not have active communication with every new user and I would want the addin to be "ready to use" as installed)

 

Any advice for this case? 

Regards, Juan.

0 Likes
1,032 Views
5 Replies
Replies (5)
Message 2 of 6

RPTHOMAS108
Mentor
Mentor

That's not an API issue, there are options in windows to increse font sizes to account for high definition monitors.

You probably find that some dialogues are tiny (those that don't support this scaling). I used to have real problem with the Autodesk sign-in window, needed a magnifying glass to read what I was typing in it.

 

I usually just put the resolution down instead of scaling the text up. HD is not great or nessesary for Windows desktop applications, in general. Would probably just adjust up when HD is required. Perhaps I am missing out on the HD Revit experience however?

 

Capture201213.PNG

Capture201213a.PNG

It says (Recommended)? Recommended for what? Looking at your screen with binoculars?

0 Likes
Message 3 of 6

jjesusdelpino
Advocate
Advocate

I absolutelly agree with you. The thing is that people who have a 4k screen usually want to work with 4k no matter what.

0 Likes
Message 4 of 6

RPTHOMAS108
Mentor
Mentor

Yes there is probably something within the WindowsAPI that will let you detect the settings used and adjust your interface for that.

 

I'm tending to go in the direction that if I use icons instead of text labels for things on the UI and explain what those icons do in help files then I don't have to consider these issues. Would also be good for localisation since you would only have to translate the document that describes the icons. Although WPF has good features for dealing with UI localisation. 

 

Another issue is using Wndows Forms, I think WPF is better at resizing itself to content (if the elements are set out correctly in the grid, correct sizing priorities etc.).

0 Likes
Message 5 of 6

jjesusdelpino
Advocate
Advocate

I started making addins with windows form due to the fair amount of people using it and the plenty of resources about it. Now I realise Ill have to learn wpf and migrate all addins. Im definitely going in your direction about addin design for the next ones.

0 Likes
Message 6 of 6

corinne.astori
Advocate
Advocate

Hi @jjesusdelpino 

I have the same issue. Did you find a solution other than recreating everything in WPF?

KR,

Corinne

0 Likes