Hi,

maybe like this (hope the comment help)

GraphicsWindow.Top = 0

GraphicsWindow.Left = 0

GraphicsWindow.Width = Desktop.Width

GraphicsWindow.Height = Desktop.Height

'Display the marker on top of the pointer

pointer = Shapes.AddRectangle(10,20)

marker = Shapes.AddEllipse(5,5)

'Center shapes (top left(right) is center - 0.5(width(height)

pointerx = GraphicsWindow.Width / 2

pointery = GraphicsWindow.Height / 2

Shapes.Move(pointer,pointerx-5,pointery-10)

Shapes.Move(marker,pointerx-2.5,pointery-2.5)

While 1=1

'Use GW.mouseX/Y since these are relative to GW coordinates and there is not device dpi scaling

mx = GraphicsWindow.MouseX

my = GraphicsWindow.MouseY

'vector from marker to Mouse

dx = mx-pointerx

dy = my-pointery

'Calculate angle in radians

If (dx = 0) Then

angle = Math.Pi/2

Else

angle = Math.ArcTan(dy/dx)

EndIf

'Make sure we are in the right quadrant

If (dx < 0) Then

angle = angle+Math.Pi

EndIf

'Convert to degrees

angle = Math.GetDegrees(angle)

'Make the short side the pointer - wouldn't need to do this if long side was width

angle = angle+90

'Rotatate pointer

Shapes.Rotate(pointer,angle)

EndWhile