Category: System
Syntax:
sysGetMonitorWidth:Int(monitor:Int)
Int
Returns the width of the given monitor in pixels.
Takes monitor (the monitor number, zero-based).
Returns the width in pixels, or 0 if the monitor number is out of range. Can be called BEFORE b2dGraphics - a program choosing a monitor has no window yet.
Asking a monitor's size and then opening fullscreen at exactly that size gives a 1:1 surface with no letterboxing.
Linux edition only - this function has no Windows counterpart, so it is not in the online documentation.
; Open fullscreen on the second monitor at its exact resolution, ; so the frame fills it 1:1 with no letterboxing. If sysGetMonitors() > 1 Then sysSetMonitor(1) EndIf Local m:Int = sysGetMonitor() b2dGraphics(sysGetMonitorWidth(m), sysGetMonitorHeight(m), 0)
BambooBasic © 2026 Michael Denathorn