Animasi Bintang Berjatuhan

Private Declare Function Ellipse Lib "gdi32" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Private Type Star
X As Long
Y As Long
Speed As Long
Size As Long
Color As Long
End Type
Dim Stars(49) As Star
Const MaxSize As Long = 5
Const MaxSpeed As Long = 25
Dim I As Long
BitBlt Me.hdc, 0, 0, Me.ScaleWidth, Me.ScaleHeight, 0, 0, 0, vbBlackness
For I = 0 To UBound(Stars)
Stars(I).Y = (Stars(I).Y Mod Me.ScaleHeight) + Stars(I).Speed
If Stars(I).Y > Me.ScaleHeight Then
Stars(I).X = Me.ScaleWidth * Rnd + 1
Stars(I).Speed = MaxSpeed * Rnd + 1
End If
Me.FillColor = Stars(I).Color
Me.ForeColor = Stars(I).Color
Ellipse Me.hdc, Stars(I).X, Stars(I).Y, Stars(I).X + Stars(I).Size, Stars(I).Y + Stars(I).Size
Next I
Me.Refresh
Double klik pada Form dan pilih Prosedur Form_Load pastekan juga syntak dibawah ini
Dim I As Long
Randomize
For I = LBound(Stars) To UBound(Stars)
Stars(I).X = Me.ScaleWidth * Rnd + 1
Stars(I).Y = Me.ScaleHeight * Rnd + 1
Stars(I).Size = MaxSize * Rnd + 1
Stars(I).Speed = MaxSpeed * Rnd + 1
Stars(I).Color = RGB(Rnd * 255 + 1, Rnd * 255 + 1, Rnd * 255 + 1)
Next I
Kemudian pilih prosedur Form_KeyDown dan patekan syntak ini
Unload Me
Maaf min, saya coba pake kode ini, tapi kok animasinya nggak ada ya
ReplyDeleteAnimasi Bintang Berjatuhan >>>>> Download Now
ReplyDelete>>>>> Download Full
Animasi Bintang Berjatuhan >>>>> Download LINK
>>>>> Download Now
Animasi Bintang Berjatuhan >>>>> Download Full
>>>>> Download LINK rg