Animasi Form VB 6: Hilang Ke Samping


Udah lama gak bersih2 lepi (laptop istilah sekarang…) eh ketemu program lucu. Program ini saya buat beberapa bulan yang lalu untuk suatu program penjadwalan sederhana. Untuk membuatnya anda tinggal copy kode program di bawah ini.

Private Sub Form_Load()
Me.Width = 10
End Sub

Private Sub Form_Unload(Cancel As Integer)
Do
With Me
.Left = .Left + 25
.Move .Left, .Top
End With
DoEvents
Loop Until Me.Left > Screen.Width

End Sub

Private Sub Timer1_Timer()
With Me
.Width = .Width + 100
tengah
If .Width >= 4000 Then
Timer1.Enabled = False
tengah
End If
End With
End Sub

Sub tengah()
With Me
.Left = (Screen.Width - .Width) / 2
.Top = (Screen.Height - .Height) / 2
End With
End Sub

Semoga bermanfaat y… :d

About these ads

2 responses to “Animasi Form VB 6: Hilang Ke Samping

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s