Hi,
Here's a little bit of code that calculates the angle between the mouse and the sprite and rotates it accordingly. I hope it helps.
set display mode 1024, 768, 32, 1
sync on
PointX = 512
PointY = 384
create bitmap 1, 10, 10
box 0, 0, 10, 10
get image 1, 0, 0, 10, 10
delete bitmap 1
set current bitmap 0
sprite 1, 0, 0, 1
offset sprite 1, 5, 5
do
set cursor 0, 0
XDist = PointX - mousex()
YDist = PointY - mousey()
Angle# = -atanfull(XDist, YDist)
sprite 1, PointX, PointY, 1
rotate sprite 1, wrapvalue(Angle#)
print Angle#
sync
loop
To learn about how the atanfull command works, you should read the wikipedia article on atan2 (the rest of the computer world calls DBPro's atanfull atan2).