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 »

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: München
Contact:

Re: Why SetProcessDPIAware?

Post by TiKu »

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 »

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