poeshoe ...

Showing posts with label VISUAL BASIC. Show all posts
Showing posts with label VISUAL BASIC. Show all posts

ANIMASI FORM LEWAT VB


Private Snow(1000, 2) As Integer
Private Amounty As Integer

Private Sub Form_Load()
Form1.Show
DoEvents
Randomize
Amounty = 325
For J = 1 To Amounty
Snow(J, 0) = Int(Rnd * Form1.Width)
Snow(J, 1) = Int(Rnd * Form1.Height)
Snow(J, 2) = 10 + (Rnd * 20)
Next J

Do While Not (DoEvents = 0)
For LS = 1 To 10
For I = 1 To Amounty
OldX = Snow(I, 0)
OldY = Snow(I, 1)
Snow(I, 1) = Snow(I, 1) + Snow(I, 2)
If Snow(I, 1) > Form1.Height Then
Snow(I, 1) = 0
Snow(I, 2) = 5 + (Rnd * 30)
Snow(I, 0) = Int(Rnd * Form1.Width)
OldX = 0
OldY = 0
End If
Coloury = 8 * (Snow(I, 2) - 10)
Coloury = 60 + Coloury
PSet (OldX, OldY), QBColor(0)
PSet (Snow(I, 0), Snow(I, 1)), RGB(Coloury, _
Coloury, Coloury)
Next I
Next LS
Label1.Refresh
Loop
End
End Sub

sumber : http://www.yogyafree.net/forum2/viewtopic.php?t=3694&id=6c28547da3fde6a0d72cd6ad224f1ff0

Related Post: