[ New messages · Members · Forum rules · Search · RSS ]
  • Page 1 of 1
  • 1
animasi label
satriaDate: Tuesday, 2011-05-03, 12:11 PM | Message # 1
Lieutenant colonel
Group: Administrators
Messages: 126
Reputation: 0
Status: Offline
buat form seperti berikut :

lalu copas pada bagian code !!!

Option Explicit

Dim Play As Boolean
Sub Sleep(Delay%)
Dim Mulai%

While Mulai < Delay - (250) And Play = True
Mulai = Mulai + 1
DoEvents
Wend
End Sub

Sub Damn()
Dim h$, f$, c$, I%, t%, d%
Dim strTemp$, length%
Dim buffLeft$, buffRight$

If Play = False Then Exit Sub
h = Text1

'// Gaya Huruf Besar dan kecil
Label1 = LCase(h)
c = Label1
For I = 1 To Len(h)
Sleep 4000
Mid(c, I, 1) = UCase(Mid(c, I, 1))
Label1 = c
Next I

For I = 1 To Len(h)
Sleep 4000
Mid(c, (Len(h) + 1) - I, 1) = _
LCase(Mid(c, (Len(h) + 1) - I, 1))
Label1 = c
Next I

'// Gaya mengetik
Label1 = "|"
For I = 1 To 5
Sleep 6000
If Label1 = "|" Then
Label1 = " "
Else
Label1 = "|"
End If
Next I

For I = 1 To Len(h)
Sleep 5000
Label1 = Left(h, I) & "|"
Next I

Label1 = Left(Label1, Len(Label1) - 1)

'// Berjalan dari sebelah kiri
Label1 = h
Do
Sleep 5000
Label1 = Mid(Label1, 2, Len(Label1) - 1) & Left(Label1, 1)
DoEvents
Loop Until Label1 = h

'// Berjalan dari sebelah kanan
Label1 = h
Do
Sleep 5000
Label1 = Right(Label1, 1) & Left(Label1, Len(Label1) - 1)
Loop Until Label1 = h

'// Gaya Terbang
t = Label1.Top
Label1.Top = t + 500
While Label1.Top >= t
Sleep 500
Label1.Top = Label1.Top - 10
Wend
Sleep 6000

'// Gaya Menghilang
Label1.Visible = False
Sleep 15000
Label1.Visible = True
Sleep 17000

'// Gaya ZOOM
'Label1.Alignment = vbCenter
For I = 1 To Label1.FontSize
Sleep 5000
Label1.FontSize = I
Next I

'// Gaya Strip
Label1 = String(Len(h), " ")
f = Label1
For I = 1 To Len(h)
Sleep 2500
c = Mid(h, Len(h) - (I - 1), 1)
Mid(f, Len(f) - (I - 1), 1) = c
Label1 = f
Next I

'// Gaya Blink
For I = 1 To 10
Sleep 8000
If Label1.Visible = True Then
Label1.Visible = False
Else
Label1.Visible = True
End If
Next I

'// Gaya Melompat dan Box
strTemp = Label1
For I = 1 To 2
length = 0
While length < Len(strTemp)
Sleep 5000
length = length + 1
If I = 1 Then
Label1 = String(Len(strTemp), " ")
buffLeft = Label1
Mid(buffLeft, length, 1) = Mid(strTemp, length, 1)
Label1 = buffLeft
buffRight = Label1
Mid(buffRight, Len(strTemp) - (length - 1), 1) = _
Mid(strTemp, Len(strTemp) - (length - 1), 1)
Label1 = buffRight
Else
buffLeft = Label1
Mid(buffLeft, length, length) = _
Mid(strTemp, length, length)
Label1 = buffLeft
buffRight = Label1
Mid(buffRight, Len(strTemp) - (length - 1), length) = _
Mid(strTemp, Len(strTemp) - (length - 1), length)
Label1 = buffRight
End If
DoEvents
Wend
Next I

Damn
End Sub

Private Sub Command1_Click()
If Command1.Caption = "Mulai" Then
Command1.Caption = "Stop"
Text1 = Text1 & " "
Label1 = Text1
Play = True
Else
Command1.Caption = "Mulai"
Play = False
End If
Damn
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Form_Load()
Form1.Caption = "Lets Play Label Animation Bro ... "
Text1.Text = "Mulai bermain - main dengan Label sama Subhan yuks!"
Command1.Caption = "Mulai"
Command2.Caption = "Close"
End Sub

 
  • Page 1 of 1
  • 1
Search: