DPI scaling is not working for images in a button

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 2 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
chbwien
Posts: 6
Last visit: Thu Aug 24, 2023 4:18 am

DPI scaling is not working for images in a button

Post by chbwien »

I have created a button with a big picture and text. This looks fine on my creation system, running 150% (32" 4k display).
150.png
150.png (94.84 KiB) Viewed 2675 times
But, when I ran the exe on a Full HD Display with 100%, the image is NOT rescaled, the image is getting bigger (same size, different dpi) and therefore the text is not fitting anymore.
100.png
100.png (65.57 KiB) Viewed 2675 times
So what are my options to have this picture button working on all display dpis? I couldn't find any image settings...
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: DPI scaling is not working for images in a button

Post by jvierra »

This topic is 2 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked