; dxCopyRect Example ; Turn on graphics mode Graphics 800,600,16 ; create a blank image gfxBlank=dxCreateImage (300,300) ; Fill the screen with random boxes in random colors For t = 1 To 1000 dxRect dxRand(800),dxRand(600),dxRand(100),dxRand(100),dxRand(0,1) dxColor dxRand(255),dxRand(255),dxRand(255) Next ; Wait a couple of seconds so the user can see it Delay 2000 ; Copy graphics randomly from the front buffer to the blank image dxCopyRect dxRand(800),dxRand(600),300,300,0,0,dxFrontBuffer(),dxImageBuffer(gfxBlank) ; Clear the screen, draw the copied to image, wait for user to hit a key dxCls DrawImage gfxBlank,0,0 dxWaitKey