You don’t often get WINDEV tips from Uncle Pete as I spend the majority of my time in WEBDEV, but here’s a quick one for you.
We use to have a lot of display issues when someone had their screen scaling set to something other than 100%. In old versions of Windows this was referred to as Font Size.
With the latest versions of WINDEV, sorry not sure what version this was completely resolved, as long as we select the Enlarge the window and controls option on the window description, our windows scale as expected with the windows setting and we don’t even have to think about it.
x is int = 24 IF RequireSerialNumber THEN x += 24 END IF RequireIMEI THEN x += 24 END IF RequireSIM THEN x += 24 END RESULT x
This worked fine for most of the users, however, one user (you know who you are!) had their display set to 150% and it was chopping off the looper.
Enter the LargeFontFactor function. It tells us what that windows setting is, so if it is set to 150% LargeFontFactor returns 1.5. So just a small tweak to our code and now the display works correctly regardless of the windows setting.
EachLine is int = 24 * LargeFontFactor() x is int = EachLine IF RequireSerialNumber THEN x += EachLine END IF RequireIMEI THEN x += EachLine END IF RequireSIM THEN x += EachLine END RESULT x
With this code, when set to 150%, EachLine calculates to 24 * 1.5 = 36, and our looper line height works as expected.