GUI/Maximum window dimensions: Difference between revisions

Content added Content deleted
Line 240: Line 240:


{{improve|Icon|Need to handle window borders which will vary from system to system and handle or comment on additional requirements.}}
{{improve|Icon|Need to handle window borders which will vary from system to system and handle or comment on additional requirements.}}
=={{header|IWBASIC}}==
<lang IWBASIC>
DEF Win:WINDOW
DEF Close:CHAR

DEF ScreenSizeX,ScreenSizeY:UINT
DEF L,T,ClientWidth,ClientHeight:INT

GETSCREENSIZE(ScreenSizeX,ScreenSizeY)

OPENWINDOW Win,0,0,ScreenSizeX,ScreenSizeY,@MAXBOX|@MINBOX|@SIZE|@MAXIMIZED,NULL,"Get client area",&MainHandler

'Left and top are always zero for this function.
GETCLIENTSIZE (Win,L,T,ClientWidth,ClientHeight)

PRINT Win,"Maximum drawing area values: width is"+STR$(ClientWidth)+" and height is"+STR$(ClientHeight)+"."

WAITUNTIL Close=1

CLOSEWINDOW WIN

END

SUB MainHandler

SELECT @MESSAGE

CASE @IDCLOSEWINDOW

Close=1

ENDSELECT

RETURN
ENDSUB
</lang>


=={{header|Mathematica}}==
=={{header|Mathematica}}==