Animasi Visual Basic
Sub AnimateForm(frm As Form)
GotoVal = frm.Height / 2
For Gointo = 1 To GotoVal
DoEvents
frm.Height = frm.Height - 100
frm.Top = (Screen.Height - frm.Height) \ 2
If frm.Height <= 500 Then Exit For Next Gointo horiz: frm.Height = 30 GotoVal = frm.Width / 2 For Gointo = 1 To GotoVal DoEvents frm.Width = frm.Width - 100 frm.Left = (Screen.Width - frm.Width) \ 2 If frm.Width <= 2000 Then Exit For Next Gointo Unload Me End Sub
Copyright by x-vb@jhie
'http://www.vbbego.cjb.net
'Penulis: x-vb@jhie - 7/19/2004
Tulisan Blink2
Code:
Private Sub Timer1_Timer()Dim Tm As Double
Dim strText As String
Dim Ctr As Integer
With Form1
.BackColor = RGB(0, 255, 0)
.FontName = "Arial Black"
.FontSize = 24
.FontBold = True
'.FontItalic = True
.FontUnderline = True
End With
strText = "YaDoY666 WuZ HeRe...!!!"
x = CurrentX
y = CurrentY
x = 100 'Set the position of the_
y = 100 'text here x = ? ,y = ?
For Ctr = 0 To 255
ForeColor = RGB(0, 0, Ctr)
x = x + 1
y = y + 1
CurrentX = x
CurrentY = y
Print strText
Next Ctr
ForeColor = RGB(0, 0, 0)
CurrentX = x: CurrentY = y
Print strText
For Tm = 1 To 300000
DoEvents
Next Tm
Form1.Cls
End Sub
'Animasi Close Form
'Cuma Butuh 1 Form,1Command Button n 3 Timer
Private Sub Command1_Click()
Timer1.Enabled = True
Timer2.Enabled = True
Timer3.Enabled = True
Form1.Height = 0
Form1.Caption = "APLIKASI AKAN DITUTUP );"
End Sub
Private Sub Form_Load()
Timer1.Interval = 1
Timer2.Interval = 1
Timer3.Interval = 2000
Timer1.Enabled = False
Timer2.Enabled = False
Timer3.Enabled = False
Form1.Left = 6000
Form1.Top = 5000
Form1.Width = 4000
Form1.Height = 2000
Command1.Left = 1000
Command1.Top = 700
Command1.Width = 2000
Command1.Height = 700
Command1.Caption = "KLIK OK );"
End Sub
Private Sub Timer1_Timer()
If Form1.Left <> Not 0 Then
Form1.Left = Form1.Left - 1
If Form1.Left = 5900 Then
Form1.Left = 6000
Else
End If
End If
End Sub
Private Sub Timer2_Timer()
If Form1.Left <> Not 0 Then
Form1.Left = Form1.Left + 1
If Form1.Left = 6000 Then
Form1.Left = 5900
End If
End If
End Sub
Private Sub Timer3_Timer()
Unload Me
End Sub
Tidak ada komentar:
Posting Komentar