Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15057

Proof of concept for handling DPI per monitor V2 transparently... or almost

$
0
0
I made an UserControl with the idea of handling DPI per monitor as transparently as possible for the host program.

It is only a proof of concept so far.

The basic idea is to change form size and controls size and position, but maintaining the form ScaleWidth and ScaleHeight on their original values, so most of the code of the host program does not need to be changed.

It currently also handles font size.
To handle pictures may be more complex.

It "studies" at design time before saving the form the controls properties and stores what properties need to be handled and how.
It uses TLBINF32.DLL for that. It is only needed/done in the IDE at design time.

To test it, you'll need Windows 10 (to support DPI aware per monitor) and the IDE manifested for DPI aware per monitor, or otherwise test the project compiled and manifested for DPI aware per monitor.

Also for testing it, you'll need to change the screen DPI or to drag the form from one monitor to another with other DPI setting.
Attached Files

Viewing all articles
Browse latest Browse all 15057

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>