DRAWING

Use USR GETPICT with FB^3

I am trying to capture the screen via USR GETPICT but the result, obtained via PICTURE in a GWorld, always comes out in black and white only.

I think your problem stems from not setting a CGrafPort. At startup, with no window, the program's port is not easily determinable. From the behaviour you describe, it is probably set to the WMgrPort (a black-and-white GrafPort).

Although the colour problem is easily overcome, for example by

CALL GETCWMGRPORT(thePort&): CALL SETPORT(thePort&)

it is inadvisable to write to the Window manager's port. It's better always to write to a window, in this case, one that covers the full screen. Then you'll get proper refreshing of the desktop at program termination.

Try the demo below. It's modified for FB^3, from Fonder (a program of mine that plays various tricks with the desktop). The full FBII code for Fonder is available at HTTP://WWW.FUTUREBASIC.ORG/SAMPLE.HTML. Because Fonder was a mini-app, there are hardly any calls to the FB Runtime. For instance,USR GETPICT isn't used. Also, I made the window with FN NEWCWINDOW, because it's also easier to get a properly located full-screen window this way.
The statement