PureBasic 5.70 LTS is out !

Developed or developing a new product in PureBasic? Tell the world about it.
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: PureBasic 5.70 LTS beta 1 is out !

Post by Dude »

kurzer 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.
That's how I assumed it works. But it makes no difference on my PC: viewtopic.php?p=522806#p522806
User avatar
Kurzer
Enthusiast
Enthusiast
Posts: 664
Joined: Sun Jun 11, 2006 12:07 am
Location: Near Hamburg

Re: PureBasic 5.70 LTS beta 1 is out !

Post by Kurzer »

Dude wrote:
kurzer 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.
That's how I assumed it works. But it makes no difference on my PC: viewtopic.php?p=522806#p522806
Hmm, I can't reproduce your problem.
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:
Image

Here is the result of my test with your example code:
Image

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 2023: 56y
"Happiness is a pet." | "Never run a changing system!"
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1243
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Re: PureBasic 5.70 LTS beta 1 is out !

Post by Paul »

Dude wrote:
kurzer 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.
That's how I assumed it works. But it makes no difference on my PC: viewtopic.php?p=522806#p522806

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.
Image Image
User avatar
Kurzer
Enthusiast
Enthusiast
Posts: 664
Joined: Sun Jun 11, 2006 12:07 am
Location: Near Hamburg

Re: PureBasic 5.70 LTS beta 1 is out !

Post by Kurzer »

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 2023: 56y
"Happiness is a pet." | "Never run a changing system!"
User avatar
Frontier
User
User
Posts: 74
Joined: Thu Dec 22, 2005 2:43 pm
Location: Chios, Greece
Contact:

Re: PureBasic 5.70 LTS beta 1 is out !

Post by Frontier »

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.
Marc56us
Addict
Addict
Posts: 1477
Joined: Sat Feb 08, 2014 3:26 pm

Re: PureBasic 5.70 LTS beta 1 is out !

Post by Marc56us »

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
Image

Vista 96 to 120 ppp
Image

Windows 10 @ 125%
Image

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
The difference is that I reduce the size of the font automatically:

:!: LoadFont(1, "Verdana", DesktopUnscaleX(10))

:arrow: 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)

:wink:
User avatar
Kuron
Addict
Addict
Posts: 1626
Joined: Sat Oct 17, 2009 10:51 pm
Location: Pacific Northwest

Re: PureBasic 5.70 LTS beta 1 is out !

Post by Kuron »

kurzer wrote:I use windows 7 (SP2) with 64 bit.
This may be part of the problem, because there is no such thing as a SP2 for Windows 7. MS only released SP1.
Best wishes to the PB community. Thank you for the memories. ♥️
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: PureBasic 5.70 LTS beta 1 is out !

Post by Dude »

Kuron wrote:there is no such thing as a SP2 for Windows 7. MS only released SP1.
He probably means this, which is Microsoft's unofficial SP2:

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.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8425
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: PureBasic 5.70 LTS beta 1 is out !

Post by netmaestro »

Thanks for the new version! And kudos to you for putting family first :mrgreen: DPI awareness is very much right on the button for these days, excellent choice of direction.
BERESHEIT
User avatar
Kuron
Addict
Addict
Posts: 1626
Joined: Sat Oct 17, 2009 10:51 pm
Location: Pacific Northwest

Re: PureBasic 5.70 LTS beta 1 is out !

Post by Kuron »

netmaestro wrote:And kudos to you for putting family first :mrgreen:
+1
mikejs
Enthusiast
Enthusiast
Posts: 160
Joined: Thu Oct 21, 2010 9:46 pm

Re: PureBasic 5.70 LTS beta 1 is out !

Post by mikejs »

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.
mikejs
Enthusiast
Enthusiast
Posts: 160
Joined: Thu Oct 21, 2010 9:46 pm

Re: PureBasic 5.70 LTS beta 1 is out !

Post by mikejs »

In other news though, I'm playing with the DPI-aware stuff and it works great 8-)
Fred
Administrator
Administrator
Posts: 16617
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PureBasic 5.70 LTS beta 1 is out !

Post by Fred »

A new version has been uploaded for Linux to fix the IDE issues, feel free to give it a try !
wombats
Enthusiast
Enthusiast
Posts: 663
Joined: Thu Dec 29, 2011 5:03 pm

Re: PureBasic 5.70 LTS beta 1 is out !

Post by wombats »

Fred wrote:A new version has been uploaded for Linux to fix the IDE issues, feel free to give it a try !
The IDE starts now.

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".
User avatar
Kurzer
Enthusiast
Enthusiast
Posts: 664
Joined: Sun Jun 11, 2006 12:07 am
Location: Near Hamburg

Re: PureBasic 5.70 LTS beta 1 is out !

Post by Kurzer »

Dude wrote:
Kuron wrote:there is no such thing as a SP2 for Windows 7. MS only released SP1.
He probably means this, which is Microsoft's unofficial SP2:
Exact!
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 2023: 56y
"Happiness is a pet." | "Never run a changing system!"
Post Reply