Page 1 of 1

Why SetProcessDPIAware?

Posted: 25 Aug 2010, 13:47
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?

Re: Why SetProcessDPIAware?

Posted: 25 Aug 2010, 15:34
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. ;)

Re: Why SetProcessDPIAware?

Posted: 26 Aug 2010, 09:34
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.