Sunday, June 19, 2016

VISUAL BASIC 6.0 ANIMASI SUARA

VISUAL BASIC 6.0


Suara & Animasi

NAMA     : FAISHAL ES
KELAS / NPM   : 1KA16 / 12115411
JURUSAN  : SISTEM INFORMASI

PENGERTIAN SINGKAT ANIMASI & SUARA



Itulah pengertian singkat dari animasi dan juga suara!!

1.Membuat Form Login
Buka Microsoft Visual Basic 6.0, lalu pilih toolbox yang akan kita gunakan






CODINGAN

Private Sub Command1_Click()
    Dim id As String
    Dim pass As String
    id = "huehue"
    pass = "huhuhaha"
    If (Text1 = "huehue" And Text2 = "huhuhaha") Then
    MsgBox "Login Berhasil."
    Form4.Show
    Unload Me
    Else
    MsgBox "Id/Password anda salah."
    End If
End Sub

2. Membuat Menu Editor
Klik Tools – lalu Klik Menu Editor

CODINGANNYA

Private Sub AboutUs_Click()
    Form5.Show
    Me.Hide
End Sub

Private Sub Exit_Click()
    If MsgBox("Yakin Ingin Keluar?", vbOKCancel, "Notification.") = vbOK Then
    End
    Else
    Form4.Show
    End If
End Sub

Private Sub Konfirmasi_Click()
    Form2.Show
    Me.Hide
End Sub

Private Sub Kwitansi_Click()
    Form3.Show
    Me.Hide
End Sub

Private Sub Home_Click()
    Form4.Show
    Me.Hide
End Sub

3. Membuat Animasi
(Membuka Form dari Tengah)
 
Codingannya

Private Sub Form_Load()

    Me.Height = 100
    Me.Width = 100
End Sub

Private Sub Timer1_Timer()
    Me.Height = Me.Height + 83
    Tengah
    If Me.Height >= 8300 Then
    Timer1.Enabled = False
    Tengah
    End If

    Me.Width = Me.Width + 143
    Tengah
    If Me.Width >= 14300 Then
    Timer1.Enabled = False
    Tengah
    End If
End Sub

Public Sub Tengah()
    Me.Left = (Screen.Width - Me.Width) / 2
    Me.Top = (Screen.Height - Me.Height) / 2
End Sub

4. Membuat  Animasi
(Tulisan Berjalan)

Codingannya

Private Sub Timer5_Timer()
    Label3.Left = Label3.Left - 15
    If Label3.Left < -Label3.Width Then
    Label3.Left = Form1.Width
    End If
End Sub

5.Memasukkan Musik
CODINGANNYA


Private Sub Command1_Click()
    WindowsMediaPlayer1.URL = App.Path & "\Oops.mp3"
End Sub

Private Sub Command2_Click()
    WindowsMediaPlayer2.URL = App.Path & "\Night Riders.mp3"
End Sub

Private Sub Command3_Click()
    WindowsMediaPlayer3.URL = App.Path & "\No Money.mp3"
End Sub

Private Sub Command4_Click()
    WindowsMediaPlayer4.URL = App.Path & "\Ramadhan Tiba.mp3"
End Sub

CODINGAN UNTUK CEK HARGA

Private Sub CPrice1_Click()
    If Unit1.Text = "" Then
        MsgBox ("Tolong isi kolom unit.")
    Else
        TPrice1.Caption = Price1.Caption * Unit1.Text
    End If
End Sub

Private Sub CPrice2_Click()
    If Unit2.Text = "" Then
        MsgBox ("Tolong isi kolom unit.")
    Else
        TPrice2.Caption = Price2.Caption * Unit2.Text
    End If
End Sub

Private Sub CPrice3_Click()
    If Unit3.Text = "" Then
        MsgBox ("Tolong isi kolom unit.")
    Else
        TPrice3.Caption = Price3.Caption * Unit3.Text
    End If
End Sub

Private Sub CPrice4_Click()
    If Unit4.Text = "" Then
        MsgBox ("Tolong isi kolom unit.")
    Else
        TPrice4.Caption = Price4.Caption * Unit4.Text
    End If
End Sub


CODINGAN UNTUK MEMUNCULKAN LISTBOX

Private Sub Buy1_Click()
    If TPrice1.Caption = "" Then
        MsgBox ("Silahkan Klik Cek Harga Terlebih Dahulu.")
    Else
        Form2.List1.AddItem Form1.Frame1 & "      || " & "Harga Satuan :" & Form1.Price1.Caption & "  || " & "Unit :" & Form1.Unit1.Text & "  || " & "Total :" & Form1.TPrice1.Caption
        Form3.List1.AddItem Form1.Frame1 & "      || " & "Harga Satuan :" & Form1.Price1.Caption & "  || " & "Unit :" & Form1.Unit1.Text & "  || " & "Total :" & Form1.TPrice1.Caption
        MsgBox ("Item Telah Ditambahkan.")
    End If
End Sub

Private Sub Buy2_Click()
    If TPrice2.Caption = "" Then
        MsgBox ("Silahkan Klik Cek Harga Terlebih Dahulu.")
    Else
        Form2.List1.AddItem Form1.Frame2 & "       || " & "Harga Satuan :" & Form1.Price2.Caption & "  || " & "Unit :" & Form1.Unit2.Text & "  || " & "Total :" & Form1.TPrice2.Caption
        Form3.List1.AddItem Form1.Frame2 & "       || " & "Harga Satuan :" & Form1.Price2.Caption & "  || " & "Unit :" & Form1.Unit2.Text & "  || " & "Total :" & Form1.TPrice2.Caption
        MsgBox ("Item Telah Ditambahkan.")
    End If
End Sub


Private Sub Buy3_Click()
    If TPrice3.Caption = "" Then
        MsgBox ("Silahkan Klik Cek Harga Terlebih Dahulu.")
    Else
        Form2.List1.AddItem Form1.Frame3 & "             || " & "Harga Satuan :" & Form1.Price3.Caption & "  || " & "Unit :" & Form1.Unit3.Text & "   || " & "Total :" & Form1.TPrice3.Caption
        Form3.List1.AddItem Form1.Frame3 & "             || " & "Harga Satuan :" & Form1.Price3.Caption & "  || " & "Unit :" & Form1.Unit3.Text & "  || " & "Total :" & Form1.TPrice3.Caption
        MsgBox ("Item Telah Ditambahkan.")
    End If
End Sub


Private Sub Buy4_Click()
    If TPrice4.Caption = "" Then
        MsgBox ("Silahkan Klik Cek Harga Terlebih Dahulu.")
    Else
        Form2.List1.AddItem Form1.Frame4 & "                || " & "Harga Satuan :" & Form1.Price4.Caption & "  || " & "Unit :" & Form1.Unit4.Text & "   || " & "Total :" & Form1.TPrice4.Caption
        Form3.List1.AddItem Form1.Frame4 & "                || " & "Harga Satuan :" & Form1.Price4.Caption & "  || " & "Unit :" & Form1.Unit4.Text & "   || " & "Total :" & Form1.TPrice4.Caption
        MsgBox ("Item Telah Ditambahkan.")
    End If
End Sub

CODINGAN COMMAND BUTTON CLEAR

Private Function bersih()
    List1.Clear
    Form3.List1.Clear
    Ongkir.Text = "-"
    Total1.Text = ""
    Form3.Total.Text = ""
    Nama.Text = ""
    Alamat.Text = ""
    EMail.Text = ""
    Telephone.Text = ""
    TOngkir.Text = ""
End Function
Membuat Animasi
(Loading)

CODINGANNYA

Private Sub Timer1_Timer()
    ProgressBar1.Value = ProgressBar1.Value + 2
    If ProgressBar1.Value = ProgressBar1.Max Then
       Timer1.Enabled = False
       MsgBox ("Terima Kasih Telah Berbelanja di Toko Kami.")
        Form3.Show
        Me.Hide
    End If
End Sub

Membuat Form Kwitansi Pembayaran

Membuat Form About Us dan Exit

CODINGANNYA

Private Sub Exit_Click()
    If MsgBox("Yakin Ingin Keluar?", vbOKCancel, "Notification.") = vbOK Then
    End
    Else
    Form4.Show
    End If
End Sub



No comments:

Post a Comment

Pengertian Desain Komunikasi Visual

 Desain Komunikasi Visual Pengertian Desain Komunikasi Visual adalah ilmu yang mengembangkan bentuk bahasa komunikasi visual berupa pengol...