I've tried the above and the best I can seem to do is produce a moving ball against a coloured background that leaves a black trail behind it! In fact using circle() with or without createctrl() seems to have no difference? Is it machine dependent or is there something a miss here?

If keepscreen is on. every things drawn on the screen will be kept in a list or in a bitmap. then, when am object comes on top and hide a part of the window. It must be repainted when the object is hidden or deleted and the bitmap of the main window graphics is drawn.
If keepscreen is off. the things are displayed on the screen. But they are not stored in the bitmap. So they are not repainted.

So the cheat is to use keepscreen on to draw the background that is always repainted by the runtime. and keepscreen off to draw the objects that will be erased when the window is repainted. But we musst tell the window to be repainted. And so we use a control that blinks a milisecond on the screen and that tells the window to be repainted.

The library keepscr.pc allows to create objects that are not repainted by the runtime. These objects can be added to a list. and this list is redrawn each time it is modified on a refresh rate you set. The objects are also redrawn when the window must be painted because of an external event.

the following objects are available:

RECT
LINE
CIRCLE
ROUNDRECT
PIXEL
ELLIPSE
TEXT
BITMAP

each object has its own color and properties (such as pen width, pen style, text bk mode, drawbitblt flag )

/*draw a moving ball*/
main () {
int i;
keepscreen_off();
for (i=0;i<1000;i++)
{
drawbk();//draw the background first
circle(i*BALLSPEED,i*BALLSPEED,20);//put the codes to draw anything you want here
sleep(25);//you may also change the paramater
}
}