Professional Documents
Culture Documents
Keterangan : Baris 1 untuk memunculkan Form 2 Baris 2 untuk menyembunyikan Form 1 Me adalah nama yang diberikan untuk Form 1
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Close() End Sub
Form 2
Public Class Form2 Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
End Sub Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click End Sub Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged End Sub Private Sub TextBox5_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox5.KeyPress If Asc(e.KeyChar) >= 48 And Asc(e.KeyChar) <= 57 Then e.Handled = False ElseIf Asc(e.KeyChar) = 43 Or Asc(e.KeyChar) = 95 Or Asc(e.KeyChar) = 45 Or Asc(e.KeyChar) = 44 Or Asc(e.KeyChar) = 46 Then e.Handled = False ElseIf e.KeyChar = vbBack Then e.Handled = False Else e.Handled = True End If End Sub
Keterangan: Baris 1 sampai 9 adalah listing code agar TextBox5 tidak dapat diinputkan oleh karakter apapun kecuali angka
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox1.Text = (String.Empty) Or TextBox2.Text = (String.Empty) Or DateTimePicker1.Text = (String.Empty) Or ComboBox1.Text = (String.Empty) Or TextBox3.Text = (String.Empty) Or TextBox4.Text = (String.Empty) Or TextBox5.Text = (String.Empty) Then MsgBox("Isilah data dengan lengkap sebelum melanjutkan!") Else Form3.Show() If TextBox1.Text = (String.Empty) Or TextBox2.Text = (String.Empty) Or DateTimePicker1.Text = (String.Empty) Or ComboBox1.Text = (String.Empty) Or TextBox3.Text = (String.Empty) Or TextBox4.Text = (String.Empty) Or TextBox5.Text = (String.Empty) Then Me.Show() Else Me.Hide() End Sub
Keterangan: Baris 1 sampai 4 adalah listing code tombol Next ketika Form 2 tidak diisi secara lengkap, dan menampilkan MessageBox berisi Isilah data dengan lengkap sebelum melanjutkan! Baris 5 sampai 8 adalah listing code tombol Next ketika Form 2 telah terisi dengan lengkap, maka program akan menampilkan form 3 dan menyembunyikan Form 2
2
Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged End Sub Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox1.Text = "" TextBox2.Text = "" DateTimePicker1.Text = "" ComboBox1.Text = "" TextBox3.Text = "" TextBox4.Text = "" TextBox5.Text = ""
Keterangan : Baris 1 sampai 7 adalah listing code untuk tombol Reset dimana jika tombol ini di-klik maka seluruh data pada Form 2 akan te-reset atau terhapus
Form 3
Public Class Form3 Private Sub RichTextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged If ListBox1.Text = ("Premium") Then TextBox1.Text = ("Rp.10.000.000,00-") If ListBox1.Text = ("Exclusive") Then TextBox1.Text = ("Rp.7.500.000,00-") If ListBox1.Text = ("Regular") Then TextBox1.Text = ("Rp.5.000.000,00-") End Sub
Keterangan:
Baris 1 menampilkan harga Rp. 10.000.000,00- ketika pilihan paket member yang dipilih adalah Premium. Baris 2 menampilkan harga Rp.7.500.000,00- ketika pilihan paket member yang dipilih adalah Exclusive. Baris 3 menampilkan harga Rp.5.000.000,- ketika pilihan pilihan member yang dipilih adalah Regular.
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Form2.Show() Me.Hide() End Sub
Keterangan : Baris 1 untuk menampilkan Form 2 Baris 2 untuk menyembunyikan Form 3 Me adalah nama yang diberikan untuk Form 3
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Dim Name1 As Integer Name1 = "Selamat! Anda telah resmi terdaftar sebagai anggota Twibi Twiboy Indonesia!" MsgBox(Name1)
Keterangan : Baris 1 untuk mendeklarasikan Name1 bertipe data Integer Baris 2 untuk menyatakan Name1 berisi Selamat! Anda telah resmi terdaftar sebagai anggota Twibi Twiboy Indonesia!"
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Form6.Show() Me.Hide() End Sub End Class
Keterangan : Baris 1 untuk menampilkan Form 6 Baris 2 untuk menyembunyikan Form 3 Me adalah nama yang diberikan untuk Form 3
Form 6
Public Class Form6 Private Sub Form6_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Label3.Text = Form2.TextBox1.Text Label4.Text = Form2.DateTimePicker1.Text Label5.Text = Form3.ListBox1.Text End Sub
Keterangan : Baris 1 menyatakan label 3 akan menampilkan data yang telah diinput pada TextBox1 di Form 2 Baris 2 menyatakan label 4 akan menampilkan data yang telah diinput pada DateTimePicker1 di Form 2 Baris 3 menyatakan label 5 akan menampilkan data yang telah diinput pada ListBox1 di Form 2
Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label2.Click End Sub Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label3.Click End Sub Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click End Sub Private Sub Label5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label5.Click End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Name1 As String
Name1 = "Terima Kasih, anda telah resmi terdaftar sebagai Twibi Twiboy Indonesia!" MsgBox(Name1) Close() End Sub
Keterangan : Baris 1 untuk menyatakan Name1 bertipe data String Baris 2 menyatakan Name1 berisi Terima Kasih, anda telah resmi terdaftar sebagai Twiboy Twiboy Indonesia! Baris 3 untuk menampilkan isi dari Name1 pada Message Box Baris 4 untuk menutup program / keluar dari program.
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Form1.Show() Me.Hide() End Sub
Keterangan : Baris 1 untuk menampilkan Form 1 Baris 2 untuk menyembunyikan Form 2 Me adalah nama yang diberikan untuk Form 6
End Class
Komponen toolbox yang digunakan adalah sebagai berikut: No. 1. Komponen Form 1 Properties Name Text 2. Label1 Name Text Keterangan Form 1 Twibi Twiboy Indonesia Label1 Selamat Datang Penggemar CherryBelle Seluruh Indonesia ! 3. Button1 Name Text 4. Button2 Name Text Button1 Sign up Button2 Cancel
5.
Form2
Name Text
6.
Label1
Name Text
7.
Label2
Name Text
Label2 Nama Label3 TTL Label4 Jenis Kelamin Label5 Agama Label6 Alamat Label7 E mail Label8 Handphone TextBox1
8.
Label3
Name Text
9.
Label4
Name Text
10.
Label5
Name Text
11.
Label6
Name Text
12.
Label7
Name Text
13.
Label8
Name Text
14.
TextBox1
Name Text
15.
TextBox2
Name Text
TextBox2
16.
DateTimePicker1
Name Text
17.
RadioButton1
Name Text
18.
RadioButton2
Name Text
19.
ComboBox1
Name Text
20.
TextBox3
Name Text
TextBox3
21.
Label8
Name Text
22.
TextBox4
Name Text
23.
TextBox5
Name Text
TextBox5
24.
PictureBox1
Name Text
PictureBox1
25.
Button 1
Name Text
26
Button 2
Name Text
27.
Form3
Name Text
28.
Label1
Name Text
29.
Label2
Name Text
Label2 Laman ini untuk mengetahui seberapa fanatiknya kamu sama Cherry Belle, Enjoy!
8
30.
Label3
Name Text
Label3 Darimana Kamu Tau Cherrybelle? CheckedListBox1 TV Radio Internet Koran Majalah Teman
31.
CheckedListBox1
Name Text
32.
Label4
Name Text
Label4 Personel Cherry Belle Favoritmu? ComboBox1 Devy Noviaty Sarwendah Tah Margareth Angelina Annisa Rahma Christy Saura Noela Unu Yefani Filliang Cherly Yuliana Aggraini Jessyca Stefani Auryn Brigitta Cynthia
33.
ComboBox1
Name Text
Label5
Name Text
34.
CheckBox1
Name Text
35.
CheckBox2
Name Text
36.
CheckBox3
Name Text
37.
CheckBox4
Name Text
CheckBox4 Unik CheckBox5 Cantik CheckBox6 Lucu Label6 Pilih Paket Membermu ListBox1 Premium Exclusive Regular
38.
CheckBox5
Name Text
39.
CheckBox6
Name Text
40.
Label6
Name Text
41.
ListBox1
Name Text
42.
Label7
Name Text
43.
TextBox1
Name Text
44.
Button1
Name Text
Button1 Kembali Button2 Registrasi Form6 Member Card Label1 Twibi Twiboy Indonesia Label2 Official Member Label3
45.
Button2
Name Text
46.
Form6
Name Text
47.
Label 1
Name Text
48.
Label2
Name Text
49.
Label3
Name Text
50.
Label4
Name
Label4
10
Text 51. Label5 Name Text 52. Button1 Name Text 53. Button 2 Name Text Button1 Finish Button2 Back To Homepage Label5
11