Futurebasic/Language/Reference/fbgetscreenrect

FBGETSCREENRECT functionEdit

FBGETSCREENRECTEdit

FunctionEdit

✔ Appearance ✔ Standard ✔ Console

SyntaxEdit

ignored = FN FBGETSCREENRECT(rect)

RevisedEdit

February, 2002 (Release 6)

DescriptionEdit

Before OS X, we were able to extract the content rectangle of a window using the following code:

// REM does not work in OS X
DIM @t,l,b,r
BLOCKMOVE WINDOW(_wndPointer)+portRect,@t,8

This no longer works because the window pointer and the grafport have been separated into different structures. You can substitute this simple function in your programs and it will work in all supported versions of the system software.

DIM @t,l,b,r // old style rectangle
FN FBGETSCREENRECT(t)

or...

DIM r AS RECT // new style rectangle
FN FBGETSCREENRECT(r)