Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
auto-detecting screen resolution for optimal window size on non-Windows systems
#2
I use this code to get the screen dimensions; maybe it will help you solve your problem. I'm on Linux — does it work on Windows and macOS?

Code: (Select All)
' auto detect screen size

screen _newimage(8000,8000,32)      ' set a screen too large
_fullscreen , _smooth              ' go to fullscreen
_delay 2                            ' wait 2 second
height% = _resizeheight            ' get max screen height
width% = _resizewidth              ' get max screen width

$console
_dest _console : ? "screen resolution is ";width%;"x";height%
system
Reply


Messages In This Thread
RE: auto-detecting screen resolution for optimal window size on non-Windows systems - by Herve - 10-31-2025, 11:24 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Enlarging window for older BAS programs (ie. Screen 7 mode) paulel 5 387 12-24-2025, 09:36 PM
Last Post: paulel
  Font Size in Threads Dimster 5 355 12-12-2025, 04:49 PM
Last Post: Dimster
  is there any way to position the inputbox$ window? madscijr 21 1,610 11-06-2025, 09:54 PM
Last Post: madscijr
  auto-detecting screen resolution for optimal window size on non-Windows systems madscijr 0 214 10-26-2025, 06:58 PM
Last Post: madscijr
  Play wav file in the background without a window on the forground Rudy M 12 1,125 09-18-2025, 07:08 PM
Last Post: Pete

Forum Jump:


Users browsing this thread: 1 Guest(s)