Microsoft Small Basic

Program Listing: LWW221
'created by :
'Antonio Augusto Barbaro
'aabproducoes.peperonity.com
'aabproducoes.cwap.me
'facebook.com/antonio.augusto.9444023
'aaugusto444@gmail.com
'==========================
'My programs===================
'XRR138 = Sheet Style 0.1================
'HCR221 = Car Wash======================
'NHB414 = Particles Ilumination (Happy 2017)======
'GNR887 = Balls Escaper 0.2 =====================
'QSB178 = Led Banner with text window input ========
'=======================================
GraphicsWindow.Title="Small Basic 1.3"
GraphicsWindow.Width=900
GraphicsWindow.Height=600
GraphicsWindow.Top=(Desktop.Height-GraphicsWindow.Height)/2 'center x
GraphicsWindow.Left=(Desktop.Width-GraphicsWindow.Width)/2 'center y
GraphicsWindow.CanResize=0
color="1=Orange;2=LightBlue;3=LightGreen;" 'array of color to the rectangles
GraphicsWindow.BrushColor=color[1]
GraphicsWindow.DrawText(10,10,"Created by Antonio Augusto Barbaro")
adv=6 'turtle advisors
rw= 100 'rectangles width
'position of rectangles
px[1]= 150
py[1]= 70
px[2]= 250
py[2]= 120
px[3]= px[2]-(rw*1.3)
py[3]= py[2]+50
'draw rectangles and simule a 3D effect
For i=1 To 3
GraphicsWindow.BrushColor= color[i]
GraphicsWindow.PenWidth=0.1 'simulate shandow
For j=rw To 1 Step -1
rect[i][j]= Shapes.AddRectangle(rw,rw)
Shapes.Move(rect[i][j],px[i],py[i]+j)
Shapes.Rotate(rect[i][j],45)
Shapes.Zoom(rect[i][j],1,0.6)
EndFor
EndFor
'add text logo
GraphicsWindow.FontSize=100
'get the center x and y
cx= GraphicsWindow.Width/2-80
cy= GraphicsWindow.Height-50
df= 3' (40/df) is the n angles used
For i=1 To 40
'gradient white to blue
GraphicsWindow.BrushColor= GraphicsWindow.GetColorFromRGB(255-i*(255/40),255-i*(255/40),255)
sbt= Shapes.AddText("Small Basic 1.3")
'simulate a rotate speed effect
Shapes.Rotate(sbt,i/df-((i/df)/2)-3)
Shapes.Move(sbt,100,350)
EndFor
'draw the turtle
px= GraphicsWindow.Width-300
GraphicsWindow.BrushColor="DarkGreen"
py= 200
width= 210
height= 290
For i=1 To 6
ang= i*Math.Pi/3-Math.Pi/2
ltd[i][1]= px+(width/1.9)*Math.Cos(ang)
ltd[i][2]= py+(height/1.9)*Math.Sin(ang)
If i=1 Or i=2 Or i=4 or i=5 then
ert= Shapes.AddEllipse(width/6,height/4)
Shapes.Move(ert,ltd[i][1]-(width/12),ltd[i][2]-(height/8))
Shapes.Rotate(ert,i*(360/3)+90)
EndIf
EndFor
'draw the head
g= Shapes.AddEllipse(58,50)
Shapes.Move(g, ltd[6][1]-29,ltd[6][2]-35)
GraphicsWindow.BrushColor="LightGreen"
GraphicsWindow.PenColor="Green"
h= Shapes.AddEllipse(10,10)
t= Shapes.AddEllipse(10,10)
Shapes.Move(h,ltd[6][1]-15,ltd[6][2]-20)
Shapes.Move(t,ltd[6][1]+5,ltd[6][2]-20)
GraphicsWindow.PenWidth=2
GraphicsWindow.PenColor="Green"
GraphicsWindow.BrushColor="LightGreen"
e= Shapes.AddEllipse(width,height)
Shapes.Move(e,px-(width/2),py-(height/2))
f= Shapes.AddEllipse(width-20,height-20)
Shapes.Move(f,px-(width/2)+10,py-(height/2)+10)
For i=1 To adv
ang= i*Math.Pi/(adv/2)-Math.Pi/2
ltd[i][1]= px+(width/2-10)*Math.Cos(ang)
ltd[i][2]= py+(height/2-10)*Math.Sin(ang)
rtd[i][1]= px+(width/5-10)*Math.Cos(ang)
rtd[i][2]= py+(height/5-10)*Math.Sin(ang)
Shapes.AddLine(px,py,ltd[i][1],ltd[i][2])
EndFor
GraphicsWindow.BrushColor="DarkGreen"
LDShapes.AddPolygon(rtd)
If LDSettings.GetValue("user")="" Then
GraphicsWindow.ShowMessage("This program is the logo and maskot to SB 1.3 drawned using only SB. Very thanks to run my program.","Thanks")
LDSettings.SetValue("user","True")
EndIf
GraphicsWindow.BrushColor="WhiteSmoke"
GraphicsWindow.FontSize=25
Timer.Interval=Math.GetRandomNumber(2000)+1000
Timer.Tick=tick
afx= 350
afy= 50
anim="True"
While anim="True"
ay=ay+2
If ay=afy then
ax=ax+2
ay= 0
EndIf
If afx anim=0
EndIf
GraphicsWindow.SetPixel(180+ax,GraphicsWindow.Height-100+ay,"Black")
GraphicsWindow.DrawText(200,GraphicsWindow.Height-100,"Welcome to the basic life")
endwhile
Sub tick
Timer.Interval=Math.GetRandomNumber(2000)+2000
For i=1 To 0.1 Step -0.05
Shapes.Zoom(h,i,i)
Shapes.Zoom(t,i,i)
Program.Delay(Math.GetRandomNumber(20)+10)
EndFor
Shapes.HideShape(h)
Shapes.HideShape(t)
Program.Delay(Math.GetRandomNumber(300)+200)
For i=0.1 To 1 Step 0.05
Shapes.Zoom(h,i,i)
Shapes.Zoom(t,i,i)
EndFor
Shapes.ShowShape(h)
Shapes.ShowShape(t)
EndSub