Graphics 640,480 dxSetBuffer dxBackBuffer() x=320 y=240 ; infinite mouse movement Repeat dxCls xs=dxMouseXSpeed() ; see how far the mouse has been moved ys=dxMouseYSpeed() dxMoveMouse 320,240 ;put the mouse back in the middle of the screen x=x+xs ;adjust mouse co-ords y=y+ys If x>dxGraphicsWidth()-1 Then x=x-dxGraphicsWidth() ;wrap screen If x<0 Then x=x+dxGraphicsWidth() If y<0 Then y=y+dxGraphicsHeight() If y>dxGraphicsHeight()-1 Then y=y-dxGraphicsHeight() dxText x,y,"X",True,True dxFlip Until dxKeyHit(1) End