I created a setup with custom wizard pages and custom background images. The problem is with non-standard DPI systems.
When I run this setup the background images are not properly showing. How can I detect the DPI size and use custom settings for wizard pages?
Deanna mentioned that the DPI can be detected like so:
However, the InnoSetup documentation suggests that
TGraphicsObject
has noPixelsPerInch
attribute, it is instead an attribute ofTFont
objects.The DPI can therefore be detected and custom settings be implemented using code similar to this:
Define the following functions by yourself to cheat Inno Setup:
Bing GO~
The "most correct" way is to have alternative images for small and larger fonts mode. The "slightly less correct" method is to pad the background so it shows that instead of shrinking. The "very wrong" method is to try and adjust the form layout/size to suit.
You can detect the DPI size using the
TGraphicsObject.PixelsPerInch
property and load a different image.