Brian Heibert wrote:
> Is it possible to change the screen size of the computer monitor
> before loading the rest of the program?
> My program needs a screen size of 1024x768
(1) Obtain a copy of RezLib from
(2) Save this demo as an FB file:
include "Tlbx RezLib.incl"
_rlRezNotFound = 7
local fn SetMainScreenResolution( resolutionName as Str31 )
dim as long j, @ nResols
dim as OSStatus @ err
dim as ScreenRef screen
xref rlInfoList(99) as RLInfo
screen = fn NewScreenRef( #0, @err )
if ( err ) then exit fn
rlInfoList = fn GetResolutionList( screen, @nResols )
j = 0
while ( j < nResols )
long if ( rlInfoList.name(j) == resolutionName )
err = fn SetResolution( screen, rlInfoList.resolutionID(j) )
err = _rlRezNotFound
end fn = err
// main program
dim as OSStatus err
err = fn SetMainScreenResolution( "1024 x 768" )
long if ( err )
stop "SetMainScreenResolution failed with error " + str$( err )
(3) Place the file RezLib in the same folder as the demo.
(4) Run the demo.