Saturday, September 28, 2013

Visual Basic Efek close

Posted on 2:00 AM in

assalammualaikum....

hri ne kita akan membuat efek close pada visual basic 6. Biar pas di tekan Command close nya keren
ok lansung ke Tkp  hehehhe......

yang kita perlu cuma sebuah1 buat Command Buttom..(.ini cuma contoh )



Private Sub Command1_Click()
Call Tutupkeren(Me, False)
End
End Sub
Private Sub Form_Unload(Cancel As Integer)
Cancel = -1
End Sub

Sub Tutupkeren(Frm As Form, Optional Maximize As Boolean = True)
Dim i As Integer
Dim iWidth As Integer
Dim iHeight As Integer

With Frm
iWidth = .Width
iHeight = .Height

If Maximize Then
.Width = 0
.Height = 0
.Show
For i = 0 To 5000 Step 500
.Width = i
.Height = i
.Left = (Screen.Width - .Width) / 2
.Top = (Screen.Height - .Height) / 2
Next
.Width = iWidth
.Height = iHeight
Else
For i = 5000 To 0 Step -10
.Width = i
.Height = i
.Left = (Screen.Width - .Width) / 2
.Top = (Screen.Height - .Height) / 2
Next
Unload Frm
End If
End With
End Sub

Selamat Mencoba :D

0 komentar:

Post a Comment