Latihan_08_46110003



Deskripsi Form Latihan_08_46110003
Form Latihan_08_46110003 terdapat tiga object yaitu Label, textbox,  dan button.

Object Label
Terdapat dua belas label yang bertuliskan “Nama”, “Alamat”, “Anda”, “Teman 1”, “Teman 2”, “Teman 3”, “Teman 4”, “Teman 5”, “Cerita 1”, “Cerita 2”, “Cerita 3”, “Cerita 4”.

Object Textbox
Terdapat enam belas textbox  yang terdiri dari 12 textbox berstatus input dan 4 textbox berstatus read only.

Script Unique
Tidak ada Script Unik, karena rumus yang digunakan pada script ini sudah digunakan pada script-script pada latihan sebelumnya.

Event
Buttonclick
Textchanged

Property
Property textbox :
Readonly = True
Multiline = True
Scrollbar = Vertical

Langkah-langkah penyelesaian
1.      Buat Form Desain terlebih dahulu, seperti contoh dibawah:
 

Kolom yang berwarna biru berisikan “Label”, kolom yang berwarna hitam berisikan “Textbox”, dan kolom yang berwarna merah berisikan “Button”.

2.      Masukkan Rumus

Public NotInheritable Class Latihan_08_46110003

    Private Sub cerita1()
        cerita1_46110003.Text = "assalamualaikum, perkenalkan namaku " & nm1_46110003.Text & ", kata orang-orang saya tampan. Saya tinggal di " & almt1_46110003.Text & " dan saya kuliah di poltek saya juga punya teman namanya adalah " & nm2_46110003.Text & " tinggal di " & almt2_46110003.Text & " dan " & nm3_46110003.Text & " tinggal di " & almt3_46110003.Text & ",  mereka adalah teman-teman yang baik "
    End Sub
    Private Sub cerita2()
        cerita2_46110003.Text = "wooiii " & nm1_46110003.Text & " namaku, saya orang bugis asli. saya tinggal di jalan " & almt1_46110003.Text & ". Sekarang saya kuliah di poltek. Saya punya banyak teman yaitu " & nm3_46110003.Text & " yang tinggal di " & almt3_46110003.Text & ", " & nm4_46110003.Text & " tinggal di " & almt4_46110003.Text & " dan " & nm5_46110003.Text & " tinggal di " & almt5_46110003.Text & "."
    End Sub
    Private Sub cerita3()
        cerita3_46110003.Text = "Apa kabar pemirsa, ketemu lagi dengan saya " & nm1_46110003.Text & ", dalam acara karnaval SCTV live in " & almt1_46110003.Text & ". Seperti yang bisa dilihat dari layar kaca anda, beginilah kondisi di TKP. Kita akan memantau 2 lokasi lainnya, bersama rekan saya " & nm5_46110003.Text & " langsung dari " & almt5_46110003.Text & " dan rekan saya yang satunya " & nm4_46110003.Text & " langsung dari " & almt4_46110003.Text & ", demikian laporan kami untuk saat ini langsung dari TKP."
    End Sub
    Private Sub cerita4()
        cerita4_46110003.Text = "heyy namaku " & nm1_46110003.Text & ", saya tinggal di " & almt1_46110003.Text & ". Saya berasal dari Sinjai. Sekarang saya kuliah di Poltek Semester 5. dulu saya sekolah di SMK Neg. 1 Sinjai. disinjai saya tinggal di " & almt1_46110003.Text & ". Di SMK saya mempunyai banyak teman diantaranya " & nm1_46110003.Text & ", dia tinggal di " & almt1_46110003.Text & ", " & nm2_46110003.Text & " tinggal di " & almt2_46110003.Text & ", " & nm3_46110003.Text & " tinggal di " & almt3_46110003.Text & ", dan" & nm6_46110003.Text & " tinggal di " & almt6_46110003.Text & "."
    End Sub

    Private Sub nm1_46110003_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nm1_46110003.TextChanged
        cerita1()
        cerita2()
        cerita3()
        cerita4()
    End Sub

    Private Sub nm2_46110003_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nm2_46110003.TextChanged
        cerita1()
        cerita2()
        cerita3()
        cerita4()
    End Sub

    Private Sub nm3_46110003_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nm3_46110003.TextChanged
        cerita1()
        cerita2()
        cerita3()
        cerita4()
    End Sub

    Private Sub nm4_46110003_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nm4_46110003.TextChanged
        cerita1()
        cerita2()
        cerita3()
        cerita4()
    End Sub

    Private Sub nm5_46110003_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nm5_46110003.TextChanged
        cerita1()
        cerita2()
        cerita3()
        cerita4()
    End Sub

    Private Sub nm6_46110003_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nm6_46110003.TextChanged
        cerita1()
        cerita2()
        cerita3()
        cerita4()
    End Sub

    Private Sub almt1_46110003_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles almt1_46110003.TextChanged
        cerita1()
        cerita2()
        cerita3()
        cerita4()
    End Sub

    Private Sub almt2_46110003_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles almt2_46110003.TextChanged
        cerita1()
        cerita2()
        cerita3()
        cerita4()
    End Sub

    Private Sub almt3_46110003_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles almt3_46110003.TextChanged
        cerita1()
        cerita2()
        cerita3()
        cerita4()
    End Sub

    Private Sub almt4_46110003_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles almt4_46110003.TextChanged
        cerita1()
        cerita2()
        cerita3()
        cerita4()
    End Sub

    Private Sub almt5_46110003_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles almt5_46110003.TextChanged
        cerita1()
        cerita2()
        cerita3()
        cerita4()
    End Sub

    Private Sub almt6_46110003_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles almt6_46110003.TextChanged
        cerita1()
        cerita2()
        cerita3()
        cerita4()
    End Sub
    Private Sub close46110003_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles close46110003.Click
        nm1_46110003.Text = ""
        nm2_46110003.Text = ""
        nm3_46110003.Text = ""
        nm4_46110003.Text = ""
        nm5_46110003.Text = ""
        nm6_46110003.Text = ""
        almt1_46110003.Text = ""
        almt2_46110003.Text = ""
        almt3_46110003.Text = ""
        almt4_46110003.Text = ""
        almt5_46110003.Text = ""
        almt6_46110003.Text = ""
        cerita1_46110003.Text = ""
        cerita2_46110003.Text = ""
        cerita3_46110003.Text = ""
        cerita4_46110003.Text = ""
    End Sub
End Class
 
3.      Jalankan program

0 komentar:

Posting Komentar

Copyright © 2012 amal maulanaTemplate by : UrangkuraiPowered by Blogger.Please upgrade to a Modern Browser.