QB64 Phoenix Edition
DPI aware? - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: Chatting and Socializing (https://qb64phoenix.com/forum/forumdisplay.php?fid=11)
+--- Forum: General Discussion (https://qb64phoenix.com/forum/forumdisplay.php?fid=2)
+--- Thread: DPI aware? (/showthread.php?tid=3557)



DPI aware? - Jack - 03-25-2025

I have my PI-5 hooked up to a large screen 3840x2160 and changed the default display setting for large screen, I don't know the actual aspect ratio as there were only 3 options, set default for large, medium or small screen
setting the default for large screen works well except for QB64pe, if I change the Font size in pixels from 19 to 21 then the IDE looks ok but the programs display in a tiny window with tiny fonts, same when using $Console:Only
any plans to make QB64pe DPI aware ?


RE: DPI aware? - Kernelpanic - 03-27-2025

I guess DPI isn't going anywhere.  Cool  Forget it! That's life!




RE: DPI aware? - James D Jarvis - 03-30-2025

(03-25-2025, 01:56 PM)Jack Wrote: I have my PI-5 hooked up to a large screen 3840x2160 and changed the default display setting for large screen, I don't know the actual aspect ratio as there were only 3 options, set default for large, medium or small screen
setting the default for large screen works well except for QB64pe, if I change the Font size in pixels from 19 to 21 then the IDE looks ok but the programs display in a tiny window with tiny fonts, same when using $Console:Only
any plans to make QB64pe DPI aware ?

Not sure it will meet all of your needs but one solution is to write most of your program output to a canvas layer and put that canvas layer on a scaled up output screen. 
This example code creates a canvas layer that is set to fixed pixel size and a main screen that is 80% of your desktop size. 
Code: (Select All)
Dim Shared canvas&, mscreen&
canvas& = _NewImage(360, 240, 256)
DTW = _DesktopWidth
DTH = _DesktopHeight
mscreen& = _NewImage(DTW * .8, DTH * .8, 256) 'this will make a maiscreen for the program 80% the size of the desktop
Screen mscreen&
_ScreenMove 20, 20
_Dest canvas& 'output to canvas
Print "Hello"
Print "01234567890123456789012345678901234567890123456789012345678901234567890123456789" 'This will wrap becasue 360 is pretty narrow
Print
Print "Press ANY KEY"
_Dest mscreen& 'output to main screen
_PutImage , canvas& 'put the canavas on the screen

Line (0, 0)-(359, 239), 15, B 'this box is drawn on the mainscreem
_PrintString (362, 200), "<--- Box is size of Canavs But Drawn on Mainscreen" 'this message will be vanishingly small on large screens
Sleep
_Dest canvas& 'output to canvas
Cls
Color 14
Print "Hello"
Print "01234567890123456789012345678901234567890123456789012345678901234567890123456789" 'This will wrap becasue 360 is pretty narrow
Print
Print "  Box is size of Canavs, Drawn on Canvas -->"
Print
Print "Press ANY KEY"
Line (0, 0)-(359, 239), 14, B 'this box is drawn on the canvas

_Dest mscreen& 'output to main screen
_PutImage , canvas& 'put the canavas on the screen

Sleep