Microsoft Small Basic
Program Listing:
Embed this in your website
<object id='sbapp' data='data:application/x-silverlight-2,' type='application/x-silverlight-2' width='640' height='480'> <param name='source' value='http://smallbasic.com/program/ClientBin/SBWeb.xap'/> <param name='onError' value='onSilverlightError' /> <param name='background' value='white' /> <param name='minRuntimeVersion' value='3.0.40624.0' /> <param name='autoUpgrade' value='true' /> <param name='initParams' value='programId=TTR706' /> </object>
gw
=
500
gh
=
gw
GraphicsWindow
.
Width
=
gw
GraphicsWindow
.
Height
=
gh
GraphicsWindow
.
BackgroundColor
=
"LightGray"
GraphicsWindow
.
PenWidth
=
0
GraphicsWindow
.
BrushColor
=
"Black"
GraphicsWindow
.
FillRectangle
(
gw
/
2
-
2
,
gh
/
2
-
10
,
4
,
20
)
GraphicsWindow
.
FillRectangle
(
gw
/
2
-
10
,
gh
/
2
-
2
,
20
,
4
)
GraphicsWindow
.
PenWidth
=
0
GraphicsWindow
.
BrushColor
=
"Magenta"
For
i
=
1
To
12
ball
[
i
]
=
Shapes
.
AddEllipse
(
40
,
40
)
theta
=
i
*
2
*
Math
.
Pi
/
12
x
=
gw
/
2
+
200
*
Math
.
Cos
(
theta
)
y
=
gh
/
2
+
200
*
Math
.
Sin
(
theta
)
Shapes
.
Move
(
ball
[
i
]
,
x
-
20
,
y
-
20
)
EndFor
While
(
"True"
)
For
i
=
1
To
12
Shapes
.
HideShape
(
ball
[
i
]
)
Program
.
Delay
(
150
)
Shapes
.
ShowShape
(
ball
[
i
]
)
EndFor
EndWhile
Copyright (c) Microsoft Corporation. All rights reserved.