http://en.wikipedia.org/wiki/Microsoft_Small_Basic
http://msdn.microsoft.com/en-us/beginner/ff384126.aspx
http://msdn.microsoft.com/en-us/beginner/ff384126.aspx
' Init Windows TextWindow.Hide() GraphicsWindow.Height = 140 GraphicsWindow.Width = 220 GraphicsWindow.Show() GraphicsWindow.Title = "ADMlN" GraphicsWindow.Clear() ' Display 3 Rectangle GraphicsWindow.BrushColor = "Red" GraphicsWindow.FillRectangle(10,10,50,50) GraphicsWindow.BrushColor = "Green" GraphicsWindow.FillRectangle(65,10,50,50) GraphicsWindow.BrushColor = "Blue" GraphicsWindow.FillRectangle(120,10,50,50) GraphicsWindow.FontSize = 28 ' Main loop While ("True") GraphicsWindow.MouseUp = OnMouseUp EndWhile ' Mouse key up event subprogram Sub OnMouseUp x = GraphicsWindow.MouseX y = GraphicsWindow.MouseY GraphicsWindow.BrushColor = "white" GraphicsWindow.FillEllipse(5,70,100,60) GraphicsWindow.BrushColor = "Black" if x>10 And x<50 Then If y>10 And y<50 Then GraphicsWindow.DrawText(10,80,"Red") EndIf EndIf if x>65 And x<115 Then If y>10 And y<50 Then GraphicsWindow.DrawText(10,80,"Green") EndIf EndIf if x>120 And x<170 Then If y>10 And y<50 Then GraphicsWindow.DrawText(10,80,"Blue") EndIf EndIf EndSub
GraphicsWindow.BackgroundColor = "White" GraphicsWindow.Title = "ECA" GraphicsWindow.Clear() GraphicsWindow.Height = 510 GraphicsWindow.Width = 510 GraphicsWindow.DrawRectangle(10,10,490,490) For F = 10 To 500 GraphicsWindow.SetPixel(F,F"Red") If F = 500 Then GraphicsWindow.DrawText(215,240,"WWW.ECA.IR") Endif Program.Delay(10) EndFor TextWindow.Show() TextWindow.WriteLine("This Is A Sample Program Written In Small Basic")
دیدگاه