Pada tugas kali ini saya akan memaparkan bagaimana menggunakan fungsi save pada vb,berikut adalah langkah-langkahnya:
1. Buat desain form seperti ini
2. Coba isi textbox diatas
3. Setelah diisi,sekarang kita tinggal mengklik button simpan,sehingga pada listbox/richbox akan menjadi seperti ini
ini dikarenakan pada button simpan kita telah memasukkan fungsi "Save",kode bisa dilihat pada kodding di bawah.
4. Ketika button mulai ditekan maka akan mengosongka seluruh textbox yang terisi
Sekian pemaparan dari saya semoga berguna,berikut adalah kodingnganya:
Public Class Form1
TextBox1.Text = Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click""TextBox2.Text = ""TextBox3.Text = ""TextBox4.Text = ""TextBox5.Text = ""End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.ClickDim var5 As ObjectDim Var4 As ObjectDim Var3 As ObjectDim Var2 As ObjectDim Var1 As ObjectDim noFile As ShortnoFile = FreeFile()
FileOpen(noFile,
Var1 = TextBox1.Text
Var2 = TextBox2.Text
Var3 = TextBox3.Text
Var4 = TextBox4.Text
var5 = TextBox5.Text
ListBox1.Items.Add(Var1 &
WriteLine(1, Var1, Var2, Var3, Var4, var5)
FileClose(1)
"D:\pro2.csv", OpenMode.Append)"-----" & Var2 & "-----" & Var3 & "----" & Var4 & "-----" & var5)End Sub
Private Sub TextBox4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox4.TextChangedIf Not Len(TextBox4.Text) = 0 ThenTextBox5.Text =
CStr(CDbl(TextBox3.Text) * CDbl(TextBox4.Text))End IfEnd Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.LoadDim var5 As ObjectDim Var4 As ObjectDim Var3 As ObjectDim Var2 As ObjectDim Var1 As ObjectDim noFile As ShortnoFile = FreeFile()
FileOpen(noFile,
Input(1, Var1)
Input(1, Var2)
Input(1, Var3)
Input(1, Var4)
Input(1, var5)
ListBox1.Items.Add(Var1 &
"D:\pro2.csv", OpenMode.Input)Do While Not EOF(noFile)"-----" & Var2 & "-----" & Var3 & "----" & Var4 & "-----" & var5)LoopFileClose(noFile)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.ClickEnd
EndEnd Sub Class
Tugas VB "Program Menggunakan Fungsi Save"
Tugas Visual Basic 2-Survey kepuasan konsumen roda dua
Berikut ini adalah tugas VB yang ke 2. Pada tugas ini saya membuat 6 form,tiap form mempunyai koding yang berbeda-beda dari yang gampang hingga yang sulit.
akan muncul combo box "Kegunaan". Berikut adalah koding untuk form 3:
Public Class Form3
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) Handles Button1.Click
Form4.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked = True Then
Label3.Visible = True
ComboBox2.Visible = True
If CheckBox2.Checked = True Then
Label3.Visible = True
ComboBox2.Visible = True
If CheckBox3.Checked = True Then
Label3.Visible = True
ComboBox2.Visible = True
If CheckBox4.Checked = True Then
Label3.Visible = True
ComboBox2.Visible = True
If CheckBox5.Checked = True Then
Label3.Visible = True
ComboBox2.Visible = True
End If
End If
End If
End If
End If
End Sub
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Form 4
Public Class Form4
Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim tgl As Integer
For tgl = 1 To 31
ComboBox1.Items.Add(tgl)
Next
Dim tahun As Integer
For tahun = 2011 To 1945 Step -1
ComboBox2.Items.Add(tahun)
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form5.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
If RadioButton1.Checked = True Then
GroupBox2.Visible = True
End If
End Sub
Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.SelectedIndexChanged
End Sub
End Class
Form 5
pada form ini anda diminta untuk memasukkan no.handphone dan alamat e-mail. tapi ketika anda ingin memasukkannya,anda akan diminta memasukkannya dalam "Input Box". Berikut adalah kodingnya:
Public Class Form5
Private Sub TextBox1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TextBox1.MouseClick
Dim x As String
x = InputBox("Masukkan Nomor Handphone Anda")
TextBox1.Text = x
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
Private Sub TextBox2_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TextBox2.MouseClick
Dim y As String
y = InputBox("Masukkan Alamat E-mail Anda")
TextBox2.Text = y
End Sub
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form6.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Form 6
angka di textbox maupun label 2 akan berhenti lalu d label 3 akan keluar tulisan yang berisi hadiah.
berikut adalah kodingnya:
Select Case Label2.Text
Case 1
Label3.Text = "Helm"
PictureBox1.Visible = True
PictureBox2.Visible = False
PictureBox3.Visible = False
PictureBox4.Visible = False
Form 1:
Form 2
pada form ini menampilkan tanggal,bulan dan tahun,yang bisa kita masukkan pada koding.
berikut adalah kodding untuk form 2:
Public Class Form2
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim tgl As Integer
For tgl = 1 To 31
ComboBox1.Items.Add(tgl)
Next
Dim bulan As Integer
For bulan = 1 To 12
ComboBox2.Items.Add(MonthName(bulan))
Next
Dim tahun As Integer
For tahun = 2000 To 1945 Step -1
ComboBox3.Items.Add(tahun)
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form3.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
End Class
Form 3
setelah kita men-check list pilihan "alasan memilih merek tsb" maka akan tampil seperti berikutakan muncul combo box "Kegunaan". Berikut adalah koding untuk form 3:
Public Class Form3
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) Handles Button1.Click
Form4.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked = True Then
Label3.Visible = True
ComboBox2.Visible = True
If CheckBox2.Checked = True Then
Label3.Visible = True
ComboBox2.Visible = True
If CheckBox3.Checked = True Then
Label3.Visible = True
ComboBox2.Visible = True
If CheckBox4.Checked = True Then
Label3.Visible = True
ComboBox2.Visible = True
If CheckBox5.Checked = True Then
Label3.Visible = True
ComboBox2.Visible = True
End If
End If
End If
End If
End If
End Sub
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Form 4
berikut tampilan form setelah radio button "Ya" di pilih
kodingnya adalah sebagai berikut:Public Class Form4
Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim tgl As Integer
For tgl = 1 To 31
ComboBox1.Items.Add(tgl)
Next
Dim tahun As Integer
For tahun = 2011 To 1945 Step -1
ComboBox2.Items.Add(tahun)
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form5.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
If RadioButton1.Checked = True Then
GroupBox2.Visible = True
End If
End Sub
Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.SelectedIndexChanged
End Sub
End Class
Form 5
pada form ini anda diminta untuk memasukkan no.handphone dan alamat e-mail. tapi ketika anda ingin memasukkannya,anda akan diminta memasukkannya dalam "Input Box". Berikut adalah kodingnya:
Public Class Form5
Private Sub TextBox1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TextBox1.MouseClick
Dim x As String
x = InputBox("Masukkan Nomor Handphone Anda")
TextBox1.Text = x
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
Private Sub TextBox2_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TextBox2.MouseClick
Dim y As String
y = InputBox("Masukkan Alamat E-mail Anda")
TextBox2.Text = y
End Sub
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form6.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Form 6
form ini merupakan form akhir dari survey/tugas yang saya buat
ketika tombol start di tekan maka angka dalam textbox dan label2 akan berubah,karena menggunakan fungsi timer. lalu apa yang terjadi apabila tombol "Stop" ditekan
berikut adalah kodingnya:
Public Class Form6
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim a As Integer
For a = 1 To 1000
TextBox1.Text = Rnd(a)
Label2.Text = Strings.Mid(TextBox1.Text, 3, 1)
Next
End Sub
Dim a As Integer
For a = 1 To 1000
TextBox1.Text = Rnd(a)
Label2.Text = Strings.Mid(TextBox1.Text, 3, 1)
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Enabled = True
Timer1.Enabled = True
If Button1.Text = "&Start" Then
Timer1.Enabled = True
Button1.Text = "Stop"
Timer1.Enabled = True
Button1.Text = "Stop"
Else
Timer1.Enabled = False
Button1.Text = "&Start"
Timer1.Enabled = False
Button1.Text = "&Start"
End If
Select Case Label2.Text
Case 1
Label3.Text = "Helm"
PictureBox1.Visible = True
PictureBox2.Visible = False
PictureBox3.Visible = False
PictureBox4.Visible = False
Case 2, 3
Label3.Text = "Jaket"
PictureBox1.Visible = False
PictureBox2.Visible = True
PictureBox3.Visible = False
PictureBox4.Visible = False
Case 4, 7
Label3.Text = "Glove"
PictureBox1.Visible = False
PictureBox2.Visible = False
PictureBox3.Visible = True
PictureBox4.Visible = False
Case 5, 6
Label3.Text = "Sepatu"
PictureBox1.Visible = False
PictureBox2.Visible = False
PictureBox3.Visible = False
PictureBox4.Visible = True
Case 0, 8, 9
Label3.Text = "Anda belum beruntung"
End Select
End Sub
Label3.Text = "Jaket"
PictureBox1.Visible = False
PictureBox2.Visible = True
PictureBox3.Visible = False
PictureBox4.Visible = False
Case 4, 7
Label3.Text = "Glove"
PictureBox1.Visible = False
PictureBox2.Visible = False
PictureBox3.Visible = True
PictureBox4.Visible = False
Case 5, 6
Label3.Text = "Sepatu"
PictureBox1.Visible = False
PictureBox2.Visible = False
PictureBox3.Visible = False
PictureBox4.Visible = True
Case 0, 8, 9
Label3.Text = "Anda belum beruntung"
End Select
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
MessageBox.Show("Terima Kasih Atas Partisipasi Anda", "Kementrian Perindustrian", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
MessageBox.Show("Terima Kasih Atas Partisipasi Anda", "Kementrian Perindustrian", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
Private Sub Form6_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
End Class
Sekian dan Terima Kasih :D
Tugas Visual Basic - Online Big Bike Shop
Berikut ini adalah program tentang online big bike shop. Pada program ini saya menampilkan fitur-fitur seperti button,textbox,label,picturebox,dan messagebox. Berikut adalah program ketika dijalankan
*ketika button ninja 250r di-klik
*ketika button ninja zx-6r di-klik
*ketika button zx-10r di-klik
*ketika button zx-14r di-klik
Gambar akan muncul secara otomatis ketika kita meng-klik button sesuai pilihan,lalu gambar akan menghilang ketika kita meng-klik button lain dengan menggunakan fungsi if,bisa diliha pada codding dibawah.
Apa yang terjadi apabila kita meng-klik button "Purchase" ?
akan muncul message box,untuk meminta konfirmasi dari anda. Lalu apa yang terjadi apabila kita meng-klik "Yes" ?
akan muncul message box lagi yang bertuliskan "Thank You for Purchasing" , dan ini pun menggunakan fungsi "IF"
berikut adalah codding dari program diatas:
"
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
PictureBox3.Visible = False
PictureBox4.Visible = False
PictureBox5.Visible = False
PictureBox2.Visible = True
TextBox1.Text = "5111"
TextBox2.Text = TextBox1.Text * 9200
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
PictureBox2.Visible = False
PictureBox4.Visible = False
PictureBox5.Visible = False
PictureBox3.Visible = True
TextBox1.Text = "10500"
TextBox2.Text = TextBox1.Text * 9200
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
PictureBox2.Visible = False
PictureBox3.Visible = False
PictureBox5.Visible = False
PictureBox4.Visible = True
TextBox1.Text = "13000"
TextBox2.Text = TextBox1.Text * 9200
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
PictureBox2.Visible = False
PictureBox3.Visible = False
PictureBox4.Visible = False
PictureBox5.Visible = True
TextBox1.Text = "13400"
TextBox2.Text = TextBox1.Text * 9200
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Dim x As Integer
x = MessageBox.Show("Are You Sure to Exit?", "Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If (x = vbYes) Then
End
End If
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Dim y As Integer
y = MessageBox.Show("Are Sure to Purchase This Product?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If (y = vbYes) Then
MessageBox.Show("Thank for Purchasing Our Product", "Purchase", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
End Sub
End Class
"
Pertemuan 4
Form ini menampilkan kode ASC atau American Standard Character.
Public Class Form2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox2.Text = Asc(TextBox1.Text)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Form3.Show()
End Sub
End Class
Untuk form ini menampilkan cara untuk memperbesar,memperkecil,mengambil huruf.
Public Class Form3
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim X As String
X = InputBox("Masukkan Huruf Besar")
TextBox1.Text = X
TextBox2.Text = LCase(X)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim y As String
y = InputBox("Masukkan Huruf Besar")
TextBox1.Text = y
TextBox2.Text = UCase(y)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim banyak As String
banyak = InputBox("Masukkan Huruf")
TextBox1.Text = banyak
TextBox2.Text = Len(banyak)
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim Kiri As String
Dim banyak As Long
Kiri = InputBox("Masukkan Kata")
banyak = InputBox("Masukkan pengambilan banyaknya")
TextBox1.Text = Kiri
TextBox2.Text = Strings.Left(Kiri, banyak)
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Dim tengah As String
Dim b As Long
tengah = InputBox("Masukkan Kata")
b = InputBox("Masukkan pengambilan banyaknya")
TextBox1.Text = tengah
TextBox3.Text = Strings.Mid(tengah, b)
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Dim kanan As String
Dim c As String
kanan = InputBox("Masukkan Kata")
c = InputBox("Masukkan pengambilan banyaknya")
TextBox1.Text = kanan
TextBox4.Text = Strings.Right(kanan, c)
End Sub
End Class
Pertemuan 3
form ini menampilkan option box. ketika kita memilih pada option box,maka teks pada text box akan menampilkan tulisan yang kita pilih seperti contoh diatas.
Public Class Form1
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Txt1.TextChanged
End Sub
Private Sub Rbt1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Rbt1.CheckedChanged
End Sub
Private Sub Rbt1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Rbt1.Click
Txt1.Text = Rbt1.Text
End Sub
Private Sub Rbt2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Rbt2.CheckedChanged
End Sub
Private Sub Rbt2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Rbt2.Click
Txt1.Text = Rbt2.Text
End Sub
Private Sub Rbt3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Rbt3.CheckedChanged
End Sub
Private Sub Rbt3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Rbt3.Click
Txt2.Text = Rbt3.Text
End Sub
Private Sub Rbt4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Rbt4.CheckedChanged
End Sub
Private Sub Rbt4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Rbt4.Click
Txt2.Text = Rbt4.Text
End Sub
Private Sub Rbt5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Rbt5.CheckedChanged
End Sub
Private Sub Rbt5_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Rbt5.Click
Txt2.Text = Rbt5.Text
End Sub
Private Sub Rbt6_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Rbt6.CheckedChanged
End Sub
Private Sub Rbt6_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Rbt6.Click
Txt2.Text = Rbt6.Text
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form2.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
End Class
form ini menampilkan tentang checkbox,pada contoh kali ini saya menampilkan jika kita men-check list pilihan maka akan muncul gambar seperti diatas.
kodenya adalah
Public Class Form2
Private Sub CheckBox5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox5.CheckedChanged
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
End
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Form1.Show()
End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked = True Then
PictureBox1.Visible = True
Else
CheckBox1.Checked = False
PictureBox1.Visible = False
End If
End Sub
Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
If CheckBox2.Checked = True Then
PictureBox2.Visible = True
Else
CheckBox2.Checked = False
PictureBox2.Visible = False
End If
End Sub
Private Sub CheckBox3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox3.CheckedChanged
If CheckBox3.Checked = True Then
PictureBox3.Visible = True
Else
CheckBox3.Checked = False
PictureBox3.Visible = False
End If
End Sub
Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox4.CheckedChanged
If CheckBox4.Checked = True Then
PictureBox4.Visible = True
Else
CheckBox4.Checked = False
PictureBox4.Visible = False
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Form3.Show()
End Sub
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
End Sub
End Class
Langganan:
Postingan (Atom)