Friday, May 15, 2009

Efek-Efek penutupn Form

==> Form Efek Lari

Private Sub EfekLari()

Dim intTop As Integer

Dim intScreenH As Integer

‘Mendapatkan Tinggi Layar

intScreenH = Screen.Height

for intTop = Me.Top to intScheenH

‘increase Top sehingga bergerak ke bawah

Me.Top = Me.Top + 1

‘ Selesaikan Proses yang mengantri

DoEvents

Next intTop

‘Unload Form

Unlod me

End Sub

==> Form Efek Lipat ke Dalam

Private Sub EfekLipatKedalam()

Dim intHeight As Integer

Dim i As Integer

‘Mencari titik tengah vertikal

intHeight = Me.Height \ 2

for i = to intHeight

DoEvents

Me.Height = Me.Height – 100

‘Set nilai Top (hasil pengurangan)

Me.Top = (Screen.Height – Me.Height) \ 2

‘Height=500 berarti tinggal title bar

If Me.Height <= 500 Then Exit For

Next i

End Sub

==> Form Efek Hancur/Acak

Private Sub Efekhancur()

Dim i As Integer, intDown As Integer

Dim intAcross As Integer

‘Memaksimalkan Form, agar lebih kelihatan

Me.WindowState = 2

‘Perbesar Ukuran Titik

DrawWidht = 3

For I = 1 To 20000

IntDown = IntDown + 1

IntAcross = intAcross + 1

‘Menggambar titik (berwarna) acak

Pset (Rnd*IntAcross, Rnd*IntDown,QBColor(Rnd*15)

Next i

End Sub

No comments:

Post a Comment