Microsoft Small Basic

Program Listing:
Embed this in your website
Sub Init
  gh = GraphicsWindow.Height
  gw = GraphicsWindow.Width
  For raws = 1 To 8
    For columns = 0 To 8
      GraphicsWindow.PenColor = "Blue"
      drop[columns][raws] = Shapes.AddLine(10,0,10,20)
      x[columns][raws] = columns * 70
      y[columns][raws] = raws * 50 - gh
      Shapes.Move(drop[columns][raws],x[columns][raws],y[columns][raws])
      Shapes.Rotate(drop[columns][raws],15)
    EndFor
  EndFor
EndSub
Init()
While 1 = 1
  For raws = 1 To 8
    For columns = 0 To 8
      random = Math.GetRandomNumber(10)
      y[columns][raws] = y[columns][raws] + random
      x[columns][raws] = x[columns][raws] - (random / 3)
      Shapes.Move(drop[columns][raws], x[columns][raws], y[columns][raws])
      If y[columns][raws] > gh Then
        y[columns][raws] = y[columns][raws] - gh - 30
      EndIf
      If x[columns][raws] < 0 Then
        x[columns][raws] = x[columns][raws] + gw
      EndIf
    EndFor
  EndFor
EndWhile

Copyright (c) Microsoft Corporation. All rights reserved.