VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Make it snow.

by Vicky j (5 Submissions)
Category: Graphics
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 23rd December 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Make it snow.

Rate Make it snow.



'Put Three Picture Box and Name the third Picture box as "Picture4" 
' NOw Copy the following Codes and Paste it under ur App. And Enjoy the snow Fall"
' If Any diff Call @ [email protected]

Dim sfx(150), sfv(150), Ptimer, Ptimer1 'Removed the 300 Labels from Patrick Tucci Snow Code.
Private Sub Form_Load()
Picture2.Picture = Picture4.Picture
For sfvar = 0 To 150
sfx(sfvar) = Picture4.ScaleWidth * Rnd
sfv(sfvar) = Picture4.ScaleHeight * Rnd
Picture4.Circle (sfx(sfvar), sfv(sfvar)), 3, QBColor(15)
Next sfvar
End Sub

Private Sub Timer1_Timer()
If Timer < Ptimer + 0.03 Then Exit Sub 'make Animation independent of Computer Speed
Picture4.Cls: Picture2.Cls
For sfvar = 0 To 150
r = Int(Rnd * 50)
sfx(sfvar) = Val(sfx(sfvar)) + r
d = Int(Rnd * 50)
sfv(sfvar) = Val(sfv(sfvar)) + d
If sfx(sfvar) > Picture4.ScaleWidth Then
sfx(sfvar) = -5
End If
If sfv(sfvar) > Picture4.ScaleHeight Then
sfv(sfvar) = -5
End If
Picture4.Circle (sfx(sfvar), sfv(sfvar)), 3, QBColor(15)
Picture2.Circle (sfx(sfvar), sfv(sfvar)), 3, QBColor(15)
Next sfvar
Ptimer = Timer
If Timer > Ptimer1 + 1 Then
Picture1.PaintPicture Picture4.Image, 0, 0
Picture4.Picture = Picture1.Image
Ptimer1 = Timer
End If
End Sub



Download this snippet    Add to My Saved Code

Make it snow. Comments

No comments have been posted about Make it snow.. Why not be the first to post a comment about Make it snow..

Post your comment

Subject:
Message:
0/1000 characters