Futurebasic/Language/Reference/fbgetscreenrect

FBGETSCREENRECT function

edit

FBGETSCREENRECT

edit

Function

edit

✔ Appearance ✔ Standard ✔ Console

Syntax

edit

ignored = FN FBGETSCREENRECT(rect)

Revised

edit

February, 2002 (Release 6)

Description

edit

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)