Selasa, 28 Mei 2013

TEXT BERGERAK (Text moving) VISUAL BASIC


TEXT BERGERAK (Text moving)  VISUAL BASIC

Desain Terlebih Dahulu Form Seperti Berikut :




 Kemudian Ketikkan Listing Program Berikut :
Dim i As Integer
Private Sub cmdGerak1_Click()
    Timer1.Enabled = True
    Timer2.Enabled = False
    i = 1
    lblText.Top = 3060
    lblText.Left = 90
   
End Sub

Private Sub cmdGerak2_Click()
    Timer2.Enabled = True
    Timer1.Enabled = False
    i = 1
    lblText.Left = -3500
    lblText.Top = 1000
End Sub

Private Sub Form_Load()

End Sub

Private Sub Timer1_Timer()
    i = i + 1
    lblText.Top = lblText.Top - i
    If i > 90 Then
    lblText.Top = 3000
    i = 1
    End If
End Sub

Private Sub Timer2_Timer()
    i = i + 1
    lblText.Left = lblText.Left + i
    If i > 128 Then
    lblText.Left = -3500
    i = 1
    End If
End Sub

Naahhh.. Lihat Hasilnya.!!
SELAMAT MENCOBA

Terkait

Description: TEXT BERGERAK (Text moving) VISUAL BASIC Rating: 4.5 Reviewer: annajmin zega ItemReviewed: TEXT BERGERAK (Text moving) VISUAL BASIC
Al
Mbah Qopet Updated at: 5/28/2013 09:48:00 PM

0 komentar :

Poskan Komentar