Why SetProcessDPIAware?

The place for programming-related topics.
Post Reply
User avatar
rlvision
Lieutenant
Posts: 18
Joined: 07 Oct 2009, 15:40
Location: Sweden
Contact:

Why SetProcessDPIAware?

Post by rlvision » 25 Aug 2010, 13:47

In your samples you are calling SetProcessDPIAware(). How does this affect your controls and VB6 in general? I did some tests, but could not see any difference in the programs I tested. What is your experience?

User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: Unterföhring
Contact:

Re: Why SetProcessDPIAware?

Post by TiKu » 25 Aug 2010, 15:34

A long time ago, I had to deal with several High-DPI related problems. At this time I decided (after reading documentation) that it would be a good idea to call SetProcessDPIAware. I do not remember anymore, but I think it indeed fixed a problem with one of my controls.
Nowadays, I remove these calls again, because according to the docs, SetProcessDPIAware should not be called directly. And to be honest, I'm also not sure it has any positive effect. ;)
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!

User avatar
rlvision
Lieutenant
Posts: 18
Joined: 07 Oct 2009, 15:40
Location: Sweden
Contact:

Re: Why SetProcessDPIAware?

Post by rlvision » 26 Aug 2010, 09:34

No, I also read that it was better to set this using the manifest instead, instead of using the api call.

I've had a lot of problems with "large fonts" for my programs. There seems to be no way of stopping windows from scaling vb-apps. It has taken me a lot of time to make sure my programs look reasonable in both standard dpi settings. I was hoping DpiAwareness this would be helpful, but as I said i could not see any difference in the two programs I tested it with.

Post Reply