411 REFERENCE · Wikibooks
Futurebasic/Language/Reference/fbgetscreenrect
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
FBGETSCREENRECT function
FBGETSCREENRECT
Function
✔ Appearance ✔ Standard ✔ Console
Syntax
ignored = FN FBGETSCREENRECT(rect)
Revised
February, 2002 (Release 6)
Description
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)