peter
14-10-2012, 19:53
Hi,
A little bit rain.
Uses "ui"
DWord hdc,hwin
hwin=Canvas_Window("Black Rain",1,1,640,480)
Canvas_Attach(hwin,0,%TRUE)
Canvas_Font("georgia",18,%CANVAS_FONTSTYLE_BOLD)
Randomize
Dim x(500),y(500),z(500) As Long
Long i,mx,m
For i=1 To 500
x(i)=Rnd(1,640)
y(i)=Rnd(1,460)
z(i)=Rnd(1,3)
Next
While IsWindow(hwin)
Canvas_BitmapRender("rainbow.bmp",0,0,640,480)
For i=1 To 500
y(i)=y(i)+z(i)
If y(i) >480 Then
x(i)=Rnd(1,649)
y(i)=1
z(i)=Rnd(1,3)
End If
Canvas_Circle(x(i),y(i),2,0)
Next
Canvas_Redraw
If GetAsyncKeyState(27) Then Exit While
Wend
Canvas_Window End
A little bit rain.
Uses "ui"
DWord hdc,hwin
hwin=Canvas_Window("Black Rain",1,1,640,480)
Canvas_Attach(hwin,0,%TRUE)
Canvas_Font("georgia",18,%CANVAS_FONTSTYLE_BOLD)
Randomize
Dim x(500),y(500),z(500) As Long
Long i,mx,m
For i=1 To 500
x(i)=Rnd(1,640)
y(i)=Rnd(1,460)
z(i)=Rnd(1,3)
Next
While IsWindow(hwin)
Canvas_BitmapRender("rainbow.bmp",0,0,640,480)
For i=1 To 500
y(i)=y(i)+z(i)
If y(i) >480 Then
x(i)=Rnd(1,649)
y(i)=1
z(i)=Rnd(1,3)
End If
Canvas_Circle(x(i),y(i),2,0)
Next
Canvas_Redraw
If GetAsyncKeyState(27) Then Exit While
Wend
Canvas_Window End