Just wondering:
Does anybody here use Microsoft Small Basic? It's a relatively young programming; only on version 0.2
It's based around .NET Framework.
It's basicly similar to Visual Basic (In terms of the code).
There's no visual, you have to run the program.
I suppose, you probably can create forms, but it's more based around Graphics Windows and TextWindows.
It's a sample code (from a simple Paddle Sqaush project I'm working on) but heres an example, so you can compare it to
VB.
Code:
GraphicsWindow.BackgroundColor = "#ADD8E6"
paddle = GraphicsWindow.AddRectangle(120, 12)
ball = GraphicsWindow.AddEllipse(16, 16)
GraphicsWindow.MouseMove = OnMouseMove
GraphicsWindow.Title = "My Paddle Game"
GraphicsWindow.CanResize = "False"
Start:
x = 0
y = 0
deltaX = 1
deltaY = 1
RunLoop:
x = x + deltaX
y = y + deltaY
gw = GraphicsWindow.Width
gh = GraphicsWindow.Height
If (x >= gw - 16 Or x <= 0) Then
deltaX = -deltaX
EndIf
If (y <= 0) Then
deltaY = -deltaY
EndIf
If (y>=(gh-12) And x<=(PaddleX+60) And x>=(PaddleX-60)) Then
deltaY = -deltaY
EndIf
GraphicsWindow.MoveShape(ball, x, y)
Program.Delay(5)
If (y < gh) Then
Goto RunLoop
EndIf
GraphicsWindow.ShowMessage("Sorry, you lose. Try again?", "Paddle Squash")
Goto Start
Sub OnMouseMove
paddleX = GraphicsWindow.MouseX
GraphicsWindow.MoveShape(paddle, paddleX - 60, GraphicsWindow.Height - 12)
EndSub
Discuss