Kode Programnya :
Option Explicit
Private Declare Function ShellExecute Lib _
"shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
Private Const SW_SHOWNORMAL = 1
Dim posTengah As Integer
Sub Keluar()
posTengah = Me.Top
Me.Top = Me.Top + 10
Me.Timer2.Interval = 50
End Sub
Private Sub Form_Load()
Me.Top = Me.Height * -1
Me.Left = (Screen.Width - Me.Width) / 1
posTengah = (Screen.Height - Me.Height) / 2
Me.Timer1.Interval = 50
End Sub
Private Sub Image1_Click()
Keluar
End Sub
Private Sub Label3_Click()
ShellExecute Me.hwnd, _
vbNullString, _
"http://edukasi-informatika.blogspot.com", _
vbNullString, _
"c:\", _
SW_SHOWNORMAL
Keluar
End Sub
Private Sub Timer1_Timer()
If Me.Top < posTengah Then
Me.Top = Me.Top + ((posTengah - Me.Top) / 2)
Else
Me.Top = posTengah
Me.Timer1.Interval = 0
End If
End Sub
Private Sub Timer2_Timer()
If Me.Top < Screen.Height Then
Me.Top = Me.Top + ((Me.Top - posTengah) * 2)
Else
Unload Me
End If
End Sub
Private Sub Timer3_Timer()
Keluar
End Sub
Post a Comment