What commands allow the program to set the resolution of the computer?
Jason
Jason
Strict Local modeCount=CountGraphicsModes() Local gfxRes:Int[32,2],gfxResCnt:Int=0 ' holds all possible resolutions Local gfxDep:Int[4],gfxDepCnt:Int=0 ' holds all possible bit depths above 8bpp Local gfxHtz:Int[16],gfxHtzCnt:Int=0 ' holds all possible refresh settings Print Print "No. of graphics modes: "+modeCount Print Local scrWidth,scrHeight,scrDepth,scrHertz For Local i=0 Until modeCount GetGraphicsMode(i,scrWidth,scrHeight,scrDepth,scrHertz) Print RSet(scrWidth,4)+" x "+RSet(scrHeight,4)+" x "+RSet(scrDepth,2)+" bpp @ "+RSet(scrHertz,3)+" hz" ' see if resolution has already been counted Local found:Int=False If gfxResCnt Then For Local j=0 Until gfxResCnt If scrWidth=gfxRes[j,0] And scrHeight=gfxRes[j,1] Then found=True Exit EndIf Next EndIf If Not found Then gfxRes[gfxResCnt,0]=scrWidth gfxRes[gfxResCnt,1]=scrHeight gfxResCnt:+1 EndIf ' check if depth already found found=False If gfxDepCnt Then For Local j=0 Until gfxDepCnt If scrDepth=gfxDep[j] Then found=True Exit EndIf Next EndIf If Not found Then gfxDep[gfxDepCnt]=scrDepth gfxDepCnt:+1 EndIf ' check if hertz already found found=False If gfxHtzCnt Then For Local j=0 Until gfxHtzCnt If scrHertz=gfxHtz[j] Then found=True Exit EndIf Next EndIf If Not found Then Local pos=0 If gfxHtzCnt Then While scrHertz>gfxHtz[pos] And pos<gfxHtzCnt pos:+1 Wend If pos<>gfxHtzCnt Then For Local j=gfxHtzCnt-1 To pos Step -1 gfxHtz[j+1]=gfxHtz[j] Next EndIf EndIf gfxHtz[pos]=scrHertz gfxHtzCnt:+1 EndIf Next Print Print "No. of resolutions supported: "+gfxResCnt Print For Local i=0 Until gfxResCnt Local ratio:Float=Float(gfxRes[i,0])/gfxRes[i,1] Print RSet(gfxRes[i,0],4)+" x "+RSet(gfxRes[i,1],4)+" Ratio "+Left(ratio,4)+":1" Next Print Print "No. of bit depths supported: "+gfxDepCnt Print For Local i=0 Until gfxDepCnt Print RSet(gfxDep[i],2)+" bpp" Next Print Print "No. of refresh rates available: "+gfxHtzCnt Print For Local i=0 Until gfxHtzCnt Print RSet(gfxHtz[i],3)+" hz" Next