A. Object-object dalam Latihan_08_46110001 :
1. Object Label
pada form latihan 08 Terdapat dua belas(12) label yang
bertuliskan: nama;alamat; anda; teman1;teman2, teman3, teman4, teman 5, cerita1, cerita2, cerita3, cerita4.
catatan : untuk cerita 1,2,3,4 menggunakan multiline pada setting propertis.
2. Object Textbox
selain itu object texbox pada form ini Terdapat enam belas textbox diantaranya 12 yang berstatus input; dan empat
berstatus read only. texbox yang berstatus input digunakan untuk memasukkan karekter berupa huruf atau nama dan alamat anda serta teman 1,2,3, dan 4 . sedangkan texbox yang berstatus
Read Only digunakan untuk menampilkan hasil dari texbox input yang telah anda is.
3.Object Button
pada form ini Terdapat satu object button yaitu ( button close).pada saat button close di klik maka semua tulisan yang ada pada form texbox akan terhapus/kosong.
B.
Script
Unique
T
cerita1() script ini digunakan sebagai Procedure yang dapat digunakan disetiap fungsi
yang diinginkan tanpa mengulang apa isi procedure tersebut.
C. Even
nm1_46110001.TextChanged
D.
Property
Property TextBox ==> ReadOnly=True
LANGKAH-LANGKAH
PENYELESAIAN
1. Langkah pertama dalam membuat form/ latihan 08
ialah, pada desktop anda, pilih microsoft visual studio 2008.seperti pada
langkah dibawah ini,
2.Setelah
itu pilih file kemudian New setelah itu pilih project, maka akan muncul
tampilan seperti dibawah ini
3. Setelah langkah ke dua selesai maka langkah selanjutnya
adalah, pada tampilan project tersebut silahkan anda mengganti nama form sesuai
dengan yang anda inginkan
4. atau jika anda pernah membuat form sebelumnya, maka
langkah selanjutnya yang perlu anda
lakukan adalah hanya dengan membuat buat form baru dengan memilih project
kemudian pilih add windows form, seperti
pada gambar dibawah ini.
5. Buatlah form seperti gambar dibawah ini, dengan cara,
pilih toolbox kemudian pada toolbox tersebut pilih dan buat label sebanyak 12
label,(kotak yang berwarna ungu
adalah label) dan texbox sebanyak 16 (kotak yang pinggirannya berwarna hitam
adalah
texbox). 4 diantaranya berstatus readonly dan multiline (cerita1,cerita2,cerita3, cerita 4) buatlah form seperti pada gambar dibawah ini.
6.Setelah itu buatlah rumus untuk menjalankan form
tersebut. Sperti rumus dibawah ini.(rumus dibawah ini merupakan rumus untuk menjalankan form diatas)
Public Class Latihan_08_46110001
Private Sub cerita1()
cerita1_46110001.Text = nm1_46110001.Text & " adalah seorang siswa yang terbiasa hidup di perkotaan, dia tinggal di" & AL1_46110001.Text & ". Karena ayah " & nm1_46110001.Text & " dipindahtugaskan di sebuah pedesaan terpencil, maka " & nm1_46110001.Text & " juga ikut pindah sekolah. Untungnya, di sekolah barunya " & nm1_46110001.Text & " punya teman yang sangat baik yang bernama " & nm4_46110001.Text & "tinggal di" & AL4_46110001.Text & ". sehingga " & nm1_46110001.Text & " merasa betah. Di sekolah barunya, ternyata " & nm1_46110001.Text & " ditaksir oleh salah seorang siswa yang sangat populer di sekolahnya yaitu" & nm2_46110001.Text & ". " & nm2_46110001.Text & " adalah ketua OSIS dan pemain basket terhebat di sekolah tersebut, dia tinggal di" & AL2_46110001.Text & ". Dan " & nm2_46110001.Text & " juga naksir sama " & nm4_46110001.Text & "."
End Sub
Private Sub cerita2()
cerita2_46110001.Text = nm2_46110001.Text & " adalah orang yang sangat sombong. " & nm2_46110001.Text & " memilki dua orang teman yang bernama " & nm3_46110001.Text & " dan " & nm4_46110001.Text & ". masing-masing tinggal di" & AL3_46110001.Text & AL4_46110001.Text & " Di sekolahnya, mereka dijuluki sebagai GENG ANGKUH."
End Sub
Private Sub cerita3()
cerita3_46110001.Text = nm3_46110001.Text & " memiliki dua orang sudara yang bernama " & nm2_46110001.Text & " dan " & nm3_46110001.Text & ". Mereka bertiga sangat akur, kompak, dan sering jalan bareng."
End Sub
Private Sub cerita4()
cerita4_46110001.Text = nm4_46110001.Text & " mempunyai dua orang sahabat. Lucunya, mereka hanya bersahabat lewat dunia maya yaitu dengan chatting lewat YM dan FB. Awalnya " & nm2_46110001.Text & " mendapat alamat email " & nm4_46110001.Text & " dari salah seorang temannya yang bernama " & nm4_46110001.Text & ". Semenjak saai itulah mereka bersahabat walaupun hanya lewat dunia maya."
End Sub
Private Sub nm1_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nm1_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub nm2_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nm2_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub nm3_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nm3_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub nm4_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nm4_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub nm5_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nm5_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub nm6_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nm6_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub AL1_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AL1_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub AL2_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AL2_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub AL3_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AL3_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub AL4_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AL4_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub AL5_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AL5_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub AL6_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AL6_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub cerita1()
cerita1_46110001.Text = nm1_46110001.Text & " adalah seorang siswa yang terbiasa hidup di perkotaan, dia tinggal di" & AL1_46110001.Text & ". Karena ayah " & nm1_46110001.Text & " dipindahtugaskan di sebuah pedesaan terpencil, maka " & nm1_46110001.Text & " juga ikut pindah sekolah. Untungnya, di sekolah barunya " & nm1_46110001.Text & " punya teman yang sangat baik yang bernama " & nm4_46110001.Text & "tinggal di" & AL4_46110001.Text & ". sehingga " & nm1_46110001.Text & " merasa betah. Di sekolah barunya, ternyata " & nm1_46110001.Text & " ditaksir oleh salah seorang siswa yang sangat populer di sekolahnya yaitu" & nm2_46110001.Text & ". " & nm2_46110001.Text & " adalah ketua OSIS dan pemain basket terhebat di sekolah tersebut, dia tinggal di" & AL2_46110001.Text & ". Dan " & nm2_46110001.Text & " juga naksir sama " & nm4_46110001.Text & "."
End Sub
Private Sub cerita2()
cerita2_46110001.Text = nm2_46110001.Text & " adalah orang yang sangat sombong. " & nm2_46110001.Text & " memilki dua orang teman yang bernama " & nm3_46110001.Text & " dan " & nm4_46110001.Text & ". masing-masing tinggal di" & AL3_46110001.Text & AL4_46110001.Text & " Di sekolahnya, mereka dijuluki sebagai GENG ANGKUH."
End Sub
Private Sub cerita3()
cerita3_46110001.Text = nm3_46110001.Text & " memiliki dua orang sudara yang bernama " & nm2_46110001.Text & " dan " & nm3_46110001.Text & ". Mereka bertiga sangat akur, kompak, dan sering jalan bareng."
End Sub
Private Sub cerita4()
cerita4_46110001.Text = nm4_46110001.Text & " mempunyai dua orang sahabat. Lucunya, mereka hanya bersahabat lewat dunia maya yaitu dengan chatting lewat YM dan FB. Awalnya " & nm2_46110001.Text & " mendapat alamat email " & nm4_46110001.Text & " dari salah seorang temannya yang bernama " & nm4_46110001.Text & ". Semenjak saai itulah mereka bersahabat walaupun hanya lewat dunia maya."
End Sub
Private Sub nm1_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nm1_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub nm2_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nm2_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub nm3_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nm3_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub nm4_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nm4_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub nm5_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nm5_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub nm6_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nm6_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub AL1_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AL1_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub AL2_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AL2_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub AL3_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AL3_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub AL4_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AL4_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub AL5_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AL5_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub AL6_46110001_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AL6_46110001.TextChanged
cerita1()
cerita2()
cerita3()
cerita4()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
nm1_46110001.Text = ""
nm2_46110001.Text = ""
nm3_46110001.Text = ""
nm4_46110001.Text = ""
nm5_46110001.Text = ""
nm6_46110001.Text = ""
AL1_46110001.Text = ""
AL2_46110001.Text = ""
AL3_46110001.Text = ""
AL4_46110001.Text = ""
AL5_46110001.Text = ""
AL6_46110001.Text = ""
cerita1_46110001.Text = ""
cerita2_46110001.Text = ""
cerita3_46110001.Text = ""
cerita4_46110001.Text = ""
nm1_46110001.Text = ""
nm2_46110001.Text = ""
nm3_46110001.Text = ""
nm4_46110001.Text = ""
nm5_46110001.Text = ""
nm6_46110001.Text = ""
AL1_46110001.Text = ""
AL2_46110001.Text = ""
AL3_46110001.Text = ""
AL4_46110001.Text = ""
AL5_46110001.Text = ""
AL6_46110001.Text = ""
cerita1_46110001.Text = ""
cerita2_46110001.Text = ""
cerita3_46110001.Text = ""
cerita4_46110001.Text = ""
End sub
End Class
End Class








0 komentar:
Posting Komentar