That's how I assumed it works. But it makes no difference on my PC: viewtopic.php?p=522806#p522806kurzer wrote:Simply activate "create DPI aware executable" in the compiler settings and your GUI will be automatically scaled on machines with different monitor DPI settings.
PureBasic 5.70 LTS is out !
Re: PureBasic 5.70 LTS beta 1 is out !
Re: PureBasic 5.70 LTS beta 1 is out !
Hmm, I can't reproduce your problem.Dude wrote:That's how I assumed it works. But it makes no difference on my PC: viewtopic.php?p=522806#p522806kurzer wrote:Simply activate "create DPI aware executable" in the compiler settings and your GUI will be automatically scaled on machines with different monitor DPI settings.
When I compile your code, I'll get two different scaled windows.
But even, if I disable the DPI aware checkbox in the compiler settings, the text in the buttons does not fit.
So I think it's a problem with the font you chose for your desktop. Maybe the DPI awareness cannot handle different font sizes?
Here are my desktop settings:
Here is the result of my test with your example code:
So if this GUI was designed on a 100% scaled desktop, another user with an 125% desktop will see exact the same GUI and sizing proportions. And in both cases the Gagdets are to small for the text.
PB 6.02 x64, OS: Win 7 Pro x64 & Win 11 x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age in 2024: 56y
"Happiness is a pet." | "Never run a changing system!"
"Happiness is a pet." | "Never run a changing system!"
Re: PureBasic 5.70 LTS beta 1 is out !
Dude wrote:That's how I assumed it works. But it makes no difference on my PC: viewtopic.php?p=522806#p522806kurzer wrote:Simply activate "create DPI aware executable" in the compiler settings and your GUI will be automatically scaled on machines with different monitor DPI settings.
You guys should be posting the version of Windows you are using.
I find Windows 7 works one way with DPI aware and Windows 10 is completely different.
I also find there are different versions of Windows 10 that give different results as well.
Re: PureBasic 5.70 LTS beta 1 is out !
I use windows 7 (SP2) with 64 bit.
PB 6.02 x64, OS: Win 7 Pro x64 & Win 11 x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age in 2024: 56y
"Happiness is a pet." | "Never run a changing system!"
"Happiness is a pet." | "Never run a changing system!"
Re: PureBasic 5.70 LTS beta 1 is out !
Thank you very much Fred and Purebasic team for this release.
Unfortunately, I get a segmentation fault error on my Arch Linux x64 install (the dependency check script reports that all required libraries are available since I am using PB 5.62 on the same machine) upon launching the 5.70b1 Purebasic executable.
Unfortunately, I get a segmentation fault error on my Arch Linux x64 install (the dependency check script reports that all required libraries are available since I am using PB 5.62 on the same machine) upon launching the 5.70b1 Purebasic executable.
Re: PureBasic 5.70 LTS beta 1 is out !
Hi all,
I don't know if it's supposed to work like this, but under XP, set to 120dpi instead of 96dpi and after rebooting (necessary for XP, Vista, Seven ?), I got this
XP 96 to 120 ppp
Vista 96 to 120 ppp
Windows 10 @ 125%
With this code:
The difference is that I reduce the size of the font automatically:
LoadFont(1, "Verdana", DesktopUnscaleX(10))
So from what I understand, DPI aware is necessary to activate detection, but is not enough. It is also necessary to indicate which elements should be enlarged or reduced.
DesktopScaleX(), DesktopScaleY(), DesktopUnscaleX(), DesktopUnscaleY() are only used to apply a resizing factor to certain elements (including fonts) if you want to not zoom in everything.
(For example to keep a reference size for items like a rule for example)
I don't know if it's supposed to work like this, but under XP, set to 120dpi instead of 96dpi and after rebooting (necessary for XP, Vista, Seven ?), I got this
XP 96 to 120 ppp
Vista 96 to 120 ppp
Windows 10 @ 125%
With this code:
Code: Select all
; Enable DPI aware
Debug "DesktopResolution (Factor x, y): " + DesktopResolutionX() + " " + DesktopResolutionY()
OpenWindow(0, 0, 0, 300, 200, "", #PB_Window_SystemMenu)
LoadFont(0, "Verdana", 10)
ButtonGadget(0, 10, 10, 220, 20, "This text must be scaled Down")
SetGadgetFont(0, FontID(0))
LoadFont(1, "Verdana", DesktopUnscaleX(10))
ButtonGadget(1, 10, 50, 220, 20, "This text must be scaled Down")
SetGadgetFont(1, FontID(1))
While WaitWindowEvent() <> #PB_Event_CloseWindow : Wend
LoadFont(1, "Verdana", DesktopUnscaleX(10))
So from what I understand, DPI aware is necessary to activate detection, but is not enough. It is also necessary to indicate which elements should be enlarged or reduced.
DesktopScaleX(), DesktopScaleY(), DesktopUnscaleX(), DesktopUnscaleY() are only used to apply a resizing factor to certain elements (including fonts) if you want to not zoom in everything.
(For example to keep a reference size for items like a rule for example)
Re: PureBasic 5.70 LTS beta 1 is out !
This may be part of the problem, because there is no such thing as a SP2 for Windows 7. MS only released SP1.kurzer wrote:I use windows 7 (SP2) with 64 bit.
Best wishes to the PB community. Thank you for the memories.
Re: PureBasic 5.70 LTS beta 1 is out !
He probably means this, which is Microsoft's unofficial SP2:Kuron wrote:there is no such thing as a SP2 for Windows 7. MS only released SP1.
https://answers.microsoft.com/en-us/win ... e1e883051e
I'm on Win 7 SP1 and PureBasic's DPI is no good for me. I'll just keep using my code to do it.
- netmaestro
- PureBasic Bullfrog
- Posts: 8433
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: PureBasic 5.70 LTS beta 1 is out !
Thanks for the new version! And kudos to you for putting family first DPI awareness is very much right on the button for these days, excellent choice of direction.
BERESHEIT
Re: PureBasic 5.70 LTS beta 1 is out !
+1netmaestro wrote:And kudos to you for putting family first
Re: PureBasic 5.70 LTS beta 1 is out !
Looks like the issue with the SQLConnect win32 api call is still present. This was reported in a couple of other threads, and is currently keeping me on 5.60 (the last version where this worked) for production code. See this thread for more detail:
viewtopic.php?f=4&t=69924
But, in short, when compiled with 5.60, I get references in the binary to SQLConnectW, but with 5.61 and later (including 5.70 beta1) it's just SQLConnect, and the function call doesn't work properly. I've not tested whether the workaround in that thread works with the beta.
viewtopic.php?f=4&t=69924
But, in short, when compiled with 5.60, I get references in the binary to SQLConnectW, but with 5.61 and later (including 5.70 beta1) it's just SQLConnect, and the function call doesn't work properly. I've not tested whether the workaround in that thread works with the beta.
Re: PureBasic 5.70 LTS beta 1 is out !
In other news though, I'm playing with the DPI-aware stuff and it works great
Re: PureBasic 5.70 LTS beta 1 is out !
A new version has been uploaded for Linux to fix the IDE issues, feel free to give it a try !
Re: PureBasic 5.70 LTS beta 1 is out !
The IDE starts now.Fred wrote:A new version has been uploaded for Linux to fix the IDE issues, feel free to give it a try !
I'm not able to get Qt to work. I installed the libs and set "qt" as the subsystem, but running the example provided by fr34k, I get the following: "QtScript.a(QtScript.o):(.qtversion[qt_version_tag]+0x0): undefined reference to `qt_version_tag'
collect2: error: ld returned 1 exit status".
Re: PureBasic 5.70 LTS beta 1 is out !
Exact!Dude wrote:He probably means this, which is Microsoft's unofficial SP2:Kuron wrote:there is no such thing as a SP2 for Windows 7. MS only released SP1.
PB 6.02 x64, OS: Win 7 Pro x64 & Win 11 x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age in 2024: 56y
"Happiness is a pet." | "Never run a changing system!"
"Happiness is a pet." | "Never run a changing system!"