SELAMAT DATANG DI BLOG SAYA

Contoh Program menggunakan objek chekbox & combobox


Dim total As Integer
total = 0 ' awal dari jumlah kredit total
If (CheckBox1.Checked = True) Then 'boleh memilih semua checkbox
            total += 3
        End If
        If (CheckBox2.Checked = True) Then
            total = total + 3
        End If
        If (CheckBox3.Checked = True) Then
            total = total + 3
        End If
If (ComboBox1.SelectedIndex = 0) Then 'hanya bisa memilih satu
            total = total + 3
        ElseIf (ComboBox1.SelectedIndex = 1) Then
            total = total + 3
        ElseIf (ComboBox1.SelectedIndex = 2) Then
            total = total + 3 
        End If
Label3.Text = CStr(total) ' hasil kredit total yang diambil