< Futurebasic < Language < Reference

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)

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.