User Submitted Source Code!
' Our user defined type.
x As Single
y As Single
speed As Single
Dim Shared CircleM As ObjectType
' We can't declare this variable with "Circle"
' since then FB can't differ it from
' the statement CIRCLE, thus "CircleM".
Screen 13,8,2,0 ' Sets the graphic mode
SetMouse 0,0,0 ' Hides the mouse cursor
CircleM.x = 150 ' Initial circle's position
CircleM.y = 90
CircleM.speed = 1 ' Circle's speed => 1 pixel per loop
Circle (CircleM.x, CircleM.y), 10, 15
' According to pushed key we change the circle's coordinates.
If MultiKey(SC_RIGHT) Then CircleM.x = CircleM.x + CircleM.speed
If MultiKey(SC_LEFT) Then CircleM.x = CircleM.x - CircleM.speed
If MultiKey(SC_DOWN) Then CircleM.y = CircleM.y + CircleM.speed
If MultiKey(SC_UP) Then CircleM.y = CircleM.y - CircleM.speed
If MultiKey(SC_SPACE) Then print "b"
Sleep 10, 1 ' Wait for 10 milliseconds.
Loop Until MultiKey(SC_Q) Or MultiKey(SC_ESCAPE)