SMKN 2 Kraksaan IT Forum

Disini nih, kita kumpul2 yuk, para alumni IT SMKN 2 Kraksaan, yang masih bersekolah, Para guru2 IT-RPL SMKN 2 Kraksaan, temen2 di komunitas inochi, Vb-bego n forum2 yang lain..
 
HomeHome  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log in  

Share | 
 

 [Share] Animasi teks...

View previous topic View next topic Go down 
AuthorMessage
Admin
Administrator
Administrator
avatar

Number of posts : 16
Registration date : 2008-10-18

PostSubject: [Share] Animasi teks...   Sat Nov 15, 2008 1:59 pm

Ada beberapa animasi teks nih.... bisa dipakek buat mempercantik interface form, atau dipelajari logikanya lumayan untuk mengasah logika pemrograman.... klu klu

Tampilannya kayak gini... doc



Disini saya tidak menjelaskan kodingnya satu-persatu, coba dipahami sendiri jika mengalami kesulitan silahkan request dibawah topik ini.... lol! lol!

Code:
VERSION 5.00
Begin VB.Form Form1
  Caption        =  "Form1"
  ClientHeight    =  3570
  ClientLeft      =  60
  ClientTop      =  450
  ClientWidth    =  7500
  LinkTopic      =  "Form1"
  ScaleHeight    =  3570
  ScaleWidth      =  7500
  StartUpPosition =  3  'Windows Default
  Begin VB.Timer TmrAnim8
      Interval        =  50
      Left            =  6660
      Top            =  3780
  End
  Begin VB.Timer TmrAnim7
      Interval        =  20
      Left            =  6210
      Top            =  3780
  End
  Begin VB.Timer TmrAnim6
      Interval        =  50
      Left            =  5760
      Top            =  3780
  End
  Begin VB.Timer TmrAnim5
      Interval        =  100
      Left            =  5310
      Top            =  3780
  End
  Begin VB.Timer TmrAnim4
      Interval        =  50
      Left            =  4860
      Top            =  3780
  End
  Begin VB.Timer TmrAnim3
      Interval        =  50
      Left            =  4410
      Top            =  3780
  End
  Begin VB.Timer TmrAnim2
      Interval        =  50
      Left            =  3960
      Top            =  3780
  End
  Begin VB.Timer TmrAnim1
      Interval        =  50
      Left            =  3510
      Top            =  3780
  End
  Begin VB.Label LblAnim8
      AutoSize        =  -1  'True
      Caption        =  "Label1"
      BeginProperty Font
        Name            =  "Courier New"
        Size            =  12
        Charset        =  0
        Weight          =  700
        Underline      =  0  'False
        Italic          =  0  'False
        Strikethrough  =  0  'False
      EndProperty
      Height          =  270
      Index          =  0
      Left            =  180
      TabIndex        =  7
      Top            =  2970
      Width          =  900
  End
  Begin VB.Label LblAnim7
      AutoSize        =  -1  'True
      Caption        =  "Label1"
      BeginProperty Font
        Name            =  "Courier New"
        Size            =  12
        Charset        =  0
        Weight          =  700
        Underline      =  0  'False
        Italic          =  0  'False
        Strikethrough  =  0  'False
      EndProperty
      Height          =  270
      Index          =  0
      Left            =  180
      TabIndex        =  6
      Top            =  2520
      Width          =  900
  End
  Begin VB.Label LblAnim6
      AutoSize        =  -1  'True
      Caption        =  "Label1"
      BeginProperty Font
        Name            =  "Courier New"
        Size            =  12
        Charset        =  0
        Weight          =  700
        Underline      =  0  'False
        Italic          =  0  'False
        Strikethrough  =  0  'False
      EndProperty
      Height          =  270
      Index          =  0
      Left            =  210
      TabIndex        =  5
      Top            =  2160
      Width          =  900
  End
  Begin VB.Label LblAnim5
      AutoSize        =  -1  'True
      Caption        =  "Label1"
      BeginProperty Font
        Name            =  "Courier New"
        Size            =  12
        Charset        =  0
        Weight          =  700
        Underline      =  0  'False
        Italic          =  0  'False
        Strikethrough  =  0  'False
      EndProperty
      Height          =  270
      Index          =  0
      Left            =  210
      TabIndex        =  4
      Top            =  1770
      Width          =  900
  End
  Begin VB.Label LblAnim4
      AutoSize        =  -1  'True
      Caption        =  "Label1"
      BeginProperty Font
        Name            =  "Courier New"
        Size            =  12
        Charset        =  0
        Weight          =  700
        Underline      =  0  'False
        Italic          =  0  'False
        Strikethrough  =  0  'False
      EndProperty
      Height          =  270
      Index          =  0
      Left            =  240
      TabIndex        =  3
      Top            =  1380
      Width          =  900
  End
  Begin VB.Label LblAnim3
      AutoSize        =  -1  'True
      Caption        =  "Label1"
      BeginProperty Font
        Name            =  "Courier New"
        Size            =  12
        Charset        =  0
        Weight          =  700
        Underline      =  0  'False
        Italic          =  0  'False
        Strikethrough  =  0  'False
      EndProperty
      Height          =  270
      Left            =  240
      TabIndex        =  2
      Top            =  990
      Width          =  900
  End
  Begin VB.Label LblAnim2
      Alignment      =  2  'Center
      AutoSize        =  -1  'True
      Caption        =  "Label1"
      BeginProperty Font
        Name            =  "Courier New"
        Size            =  12
        Charset        =  0
        Weight          =  700
        Underline      =  0  'False
        Italic          =  0  'False
        Strikethrough  =  0  'False
      EndProperty
      Height          =  270
      Left            =  240
      TabIndex        =  1
      Top            =  600
      Width          =  6930
  End
  Begin VB.Label LblAnim1
      AutoSize        =  -1  'True
      Caption        =  "Label1"
      BeginProperty Font
        Name            =  "Courier New"
        Size            =  12
        Charset        =  0
        Weight          =  700
        Underline      =  0  'False
        Italic          =  0  'False
        Strikethrough  =  0  'False
      EndProperty
      Height          =  270
      Left            =  240
      TabIndex        =  0
      Top            =  210
      Width          =  900
  End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Anim1 As String, Anim2 As String, Anim3 As String, Anim4 As String, Anim5 As String, Anim6 As String, Anim7 As String, Anim8 As String

Private Sub Form_Load()
Anim1 = "Agoes Doubleb Keren"
Anim2 = "Doubpsycho Cakep"
Anim3 = "Agoes Tri Hariyanto"
Anim4 = "Keren gak animasinya"
Anim5 = "Hidup Agoes yang cakep"
Anim6 = "Pagi Mas Agoes yang Keren"
Anim7 = "Visual Basic 6 Is The Best"
Anim8 = "I'm Falling in Love with API"
LblAnim1 = Anim1
LblAnim2 = Anim2
LblAnim3 = Anim3

LblAnim4(0) = Left(Anim4, 1)
For i = 1 To Len(Anim4) - 1
 Load LblAnim4(i)
 LblAnim4(i).Visible = True
 LblAnim4(i).Caption = Mid(Anim4, i + 1, 1)
 LblAnim4(i).Move LblAnim4(i - 1).Left + LblAnim4(i - 1).Width
Next i

LblAnim5(0) = Left(Anim5, 1)
For i = 1 To Len(Anim5) - 1
 Load LblAnim5(i)
 LblAnim5(i).Visible = True
 LblAnim5(i).Caption = Mid(Anim5, i + 1, 1)
 LblAnim5(i).Move LblAnim5(i - 1).Left + LblAnim5(i - 1).Width
Next i

LblAnim6(0) = Left(Anim6, 1)
For i = 1 To Len(Anim6) - 1
 Load LblAnim6(i)
 LblAnim6(i).Visible = True
 LblAnim6(i).Caption = Mid(Anim6, i + 1, 1)
 LblAnim6(i).Move LblAnim6(i - 1).Left + LblAnim6(i - 1).Width
Next i

LblAnim7(0) = Left(Anim7, 1)
LblAnim7(0).Visible = False
For i = 1 To Len(Anim7) - 1
 Load LblAnim7(i)
 'LblAnim7(i).Visible = True
 LblAnim7(i).Caption = Mid(Anim7, i + 1, 1)
 LblAnim7(i).Move LblAnim7(i - 1).Left + LblAnim7(i - 1).Width
Next i


LblAnim8(0) = Left(Anim8, 1)
For i = 1 To Len(Anim8) - 1
 Load LblAnim8(i)
 LblAnim8(i).Visible = True
 LblAnim8(i).Caption = Mid(Anim8, i + 1, 1)
 LblAnim8(i).Move LblAnim8(i - 1).Left + LblAnim8(i - 1).Width
Next i
End Sub

Private Sub TmrAnim1_Timer()
Static Kanan As Boolean
LblAnim1.Left = LblAnim1.Left + IIf(Kanan, 400, -400)
If LblAnim1.Left < 0 Then
 Kanan = True
ElseIf LblAnim1.Left > Me.Width - LblAnim1.Width Then
 Kanan = False
End If
End Sub

Private Sub TmrAnim2_Timer()
Static i As Integer
i = i + 1
If TmrAnim2.Interval = 500 Then
 LblAnim2.Caption = IIf(LblAnim2.Caption = "", Anim2, "")
 If i = 6 Then
  i = 0
  TmrAnim2.Interval = 50
 End If
Else
 LblAnim2.Caption = Left(Anim2, i)
End If
If i = Len(Anim2) Then
 i = 0
 TmrAnim2.Interval = 500
End If
End Sub

Private Sub TmrAnim3_Timer()
Static Atas As Boolean
Static TopAsli As Integer
If TopAsli = 0 Then TopAsli = LblAnim3.Top
LblAnim3.Top = IIf(Atas, LblAnim3.Top - 60, TopAsli)
Atas = Not Atas
LblAnim3.Left = LblAnim3.Left + 400
If LblAnim3.Left > Me.Width Then
 LblAnim3.Left = 0 - LblAnim3.Width
End If
End Sub

Private Sub TmrAnim4_Timer()
Static j As Integer
If j < Len(Anim4) Then LblAnim4(j).FontSize = LblAnim4(j).FontSize + 9
If j > 0 And j < Len(Anim4) + 1 Then LblAnim4(j - 1).FontSize = LblAnim4(j - 1).FontSize - 3
If j > 1 And j < Len(Anim4) + 2 Then LblAnim4(j - 2).FontSize = LblAnim4(j - 2).FontSize - 3
If j > 2 Then LblAnim4(j - 3).FontSize = LblAnim4(j - 3).FontSize - 3

j = j + 1
If j > Len(Anim4) + 2 Then
 j = 0
End If
End Sub

Private Sub TmrAnim5_Timer()

Static j As Integer
Dim i As Integer
If j < Len(Anim5) Then LblAnim5(j).Top = LblAnim5(j).Top - 60
If j > 0 And j < Len(Anim5) + 1 Then LblAnim5(j - 1).Top = LblAnim5(j - 1).Top + 60
j = j + 1
If j > Len(Anim5) + 2 Then
 j = 0
End If
For i = 0 To Len(Anim5) - 1
 LblAnim5(i).Left = LblAnim5(i).Left + 200
Next i
If LblAnim5(0).Left > Me.Width Then
 For i = Len(Anim5) - 1 To 0 Step -1
  LblAnim5(i).Left = IIf(i = Len(Anim5) - 1, 0 - LblAnim5(i).Width, 0 - ((Len(Anim5) - i) * LblAnim5(i).Width))
 Next i
End If
End Sub

Private Sub TmrAnim6_Timer()
Static j As Integer
Randomize
If j > 0 And j < Len(Anim6) + 1 Then LblAnim6(j - 1).ForeColor = vbBlack
If j > 1 And j < Len(Anim6) + 2 Then LblAnim6(j - 2).ForeColor = vbBlue
j = j + 1
If j > Len(Anim6) + 2 Then
 j = 0
End If
For i = 0 To Len(Anim6) - 1
 LblAnim6(i).Left = LblAnim6(i).Left + 200
Next i
If LblAnim6(0).Left > Me.Width Then
 For i = Len(Anim6) - 1 To 0 Step -1
  LblAnim6(i).Left = IIf(i = Len(Anim6) - 1, 0 - LblAnim6(i).Width, 0 - ((Len(Anim6) - i) * LblAnim6(i).Width))
 Next i
End If
End Sub

Private Sub TmrAnim7_Timer()
Static j As Integer
Randomize
Jatuh LblAnim7(j), LblAnim7(j).Top
j = j + 1
If j = Len(Anim7) Then
 j = 0
 For i = 0 To Len(Anim7) - 1
  LblAnim7(i).Visible = False
 Next i
End If
End Sub

Private Sub Jatuh(Obj As Label, NTop As Integer)
Obj.Top = 0
Obj.Visible = True
While Not Obj.Top > NTop
 Obj.Top = Obj.Top + 1
Wend
End Sub

Private Sub TmrAnim8_Timer()
Static j As Integer
Randomize
If j > 0 And j < Len(Anim8) + 1 Then LblAnim8(j - 1).ForeColor = vbRed
If j > 1 And j < Len(Anim8) + 2 Then LblAnim8(j - 2).ForeColor = vbBlack
j = j + 1
If j > Len(Anim8) + 2 Then
 j = 0
End If
End Sub

Kopikan kode diatas Di Notepad lalu simpan dengan nama AnimasiLabel.Frm .....


Oke keep Smile..... hug hug
Back to top Go down
View user profile http://smkn2kraksaanitforum.forummotions.com
pradita Irawan
TK
TK


Number of posts : 1
Lokasi : Pay TowN
Job/hobbies : Main listrik,foto-foto bis, GANDOL MAniaK TIAP pulang sc0l, Bikin merc0n/bom,Drag,modif,Maen Game{NE
Registration date : 2009-02-20

PostSubject: Re: [Share] Animasi teks...   Fri Feb 20, 2009 9:54 pm

Hiii.... How R' U???

Pemrogramannya gax da eang lebih modern lagy gag...????? Laughing
N Lbih kereNNN
Back to top Go down
View user profile
Admin
Administrator
Administrator
avatar

Number of posts : 16
Registration date : 2008-10-18

PostSubject: Re: [Share] Animasi teks...   Sat Feb 21, 2009 12:39 am

pradita Irawan wrote:
Hiii.... How R' U???

Pemrogramannya gax da eang lebih modern lagy gag...????? Laughing
N Lbih kereNNN

Kalok mas mo share silahkan...
Back to top Go down
View user profile http://smkn2kraksaanitforum.forummotions.com
Sponsored content




PostSubject: Re: [Share] Animasi teks...   

Back to top Go down
 
[Share] Animasi teks...
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Let's share our pics!
» Thank you your share ...
» How to share pictures, pdf and other files?
» Share a Coke!
» New stones to share

Permissions in this forum:You cannot reply to topics in this forum
SMKN 2 Kraksaan IT Forum :: Forum Pemrograman :: Pemrograman VB-
Jump to: