Forum > Win32/64

Saving Form sizes using Windows DPI aware

<< < (4/4)

winni:
Just wanted to say: It's too hot for hunting bugs, but then I saw, that you don't live in Europe....

If you just want to solve the problem, then there is a rude way:

In TForm1.resize check if the Form has the desired height and width.
If not resize the Form and all the children.

I did that once when the KDE desktop hat strange ideas about the size of the application while restoring a session. 

This works but you'll never know what's the reason of this strange behaviour.

Winni

VTwin:

--- Quote from: winni on July 24, 2019, 11:09:11 pm ---Just a guess:

If it only happens in Win7, what about a Windows speciality: the anoying manifest files?

Are they turned of in the project options?  Or do they interact strange with the DPI stuff?

Only a guess.

Winni

--- End quote ---

Possibly. I do have them turned on, with DPI awareness off. I'll try turning the darn things off altogether.

We did get bonkers hot over the weekend, but got a bit of a break. That second solution sounds like a last resort. If I had Windows on trunk I might try harder to bug hunt, but I've got my hands full, and only run Mac on trunk. I'll still see if I can isolate the behavior, but I just might have to wait on trying to get DPI aware.

Thanks,
VTwin

VTwin:
Turning of manifest does not seem to make any difference.

Disabling application scaling is a good step, but every time I switch to or from Windows, I have to make a small change in a form layout to force it to rebuild to the correct scaling. I end up with shrunken forms on Windows, or huge forms on Mac. Very frustrating.

Does anyone else who is doing cross-platform have this problem? Has anyone come up with a solution?

trev:

--- Quote from: VTwin on July 25, 2019, 01:40:10 am ---Does anyone else who is doing cross-platform have this problem? Has anyone come up with a solution?

--- End quote ---

I have an application which runs on macOS, Windows, Linux and FreeBSD which does not exhibit any scaling problem across those platforms.

However, I do not store the width of forms for restoration; I simply store the TOP and LEFT form properties.

zgabrovski:
One year ago I spent a lot of time with this.

https://forum.lazarus.freepascal.org/index.php/topic,49159.0.html

Navigation

[0] Message Index

[*] Previous page

Go to full version