Rabu, 13 April 2016

Berikut ini adalah contoh tampilan yang dibuat :



Untuk membuat program ini, objek-objek yang dibutuhkan adalah :
  1. Satu buah form
  2. Satu buah label (untuk teks yang ingin dijalankan, dalam hal ini teks “Selamat Datang”)
  3. Satu buah CommandButton
  4. Satu buah Timer

Berikut ini adalah method-method yang diberikan agar program diatas dapat berjalan :

Method pada CommandButton :
Private Sub Command1_Click()
If Command1.Caption = "Mainkan" Then
    Timer1.Enabled = True
    Command1.Caption = "Stop"
Else
    Timer1.Enabled = False
    Command1.Caption = "Mainkan"
End If
End Sub


Method pada Timer :
Private Sub Timer1_Timer()
Select Case Label1
    Case "S"
    Label1.Caption = "SE"
    Case "SE"
    Label1.Caption = "SEL"
    Case "SEL"
    Label1.Caption = "SELA"
    Case "SELA"
    Label1.Caption = "SELAM"
    Case "SELAM"
    Label1.Caption = "SELAMA"
    Case "SELAMA"
    Label1.Caption = "SELAMAT"
    Case "SELAMAT"
    Label1.Caption = "SELAMAT "
    Case "SELAMAT "
    Label1.Caption = "SELAMAT D"
    Case "SELAMAT D"
    Label1.Caption = "SELAMAT DA"
    Case "SELAMAT DA"
    Label1.Caption = "SELAMAT DAT"
    Case "SELAMAT DAT"
    Label1.Caption = "SELAMAT DATA"
    Case "SELAMAT DATA"
    Label1.Caption = "SELAMAT DATAN"
    Case "SELAMAT DATAN"
    Label1.Caption = "SELAMAT DATANG"
    Case "SELAMAT DATANG"
    Label1.Caption = "S"
End Select

End Sub



0 komentar:

Clock

Gunadarma University

Popular Posts

Diberdayakan oleh Blogger.