Microsoft Small Basic

Program Listing:
Embed this in your website
Arrow = Shapes.AddImage("http://cdn4.iconfinder.com/data/icons/markerstyle_icons/PNG/64px/arrow-right.png")
Shapes.Move(Arrow,200,200)
While 1 = 1
  Program.Delay(5)
  difx = GraphicsWindow.MouseX - 200
  dify = GraphicsWindow.MouseY - 200
  If difx > 0 Then
    Angle = Math.GetDegrees(Math.ArcTan(dify / difx))
  ElseIf difx < 0 Then
    Angle = Math.GetDegrees(Math.ArcTan(dify / difx)) + 180
  ElseIf difx = 0 And dify > 0 Then
    Angle = 90
    EndIf
    Shapes.Rotate(Arrow,Angle)
    EndWhile

Copyright (c) Microsoft Corporation. All rights reserved.