Public Class Form4
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles RadioButton1.CheckedChanged
If RadioButton1.Checked
= True Then
If ComboBox1.Text = "Dewasa" Then
PictureBox1.Image = Image.FromFile(Application.StartupPath & "\Bapak.jpg")
ElseIf ComboBox1.Text = "Orang Tua" Then
PictureBox1.Image = Image.FromFile(Application.StartupPath & "\Ayah.jpg")
Else
PictureBox1.Image = Image.FromFile(Application.StartupPath & "\Udin.jpg")
End If
End If
End Sub
Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles RadioButton1.CheckedChanged
If RadioButton2.Checked
= True Then
If ComboBox1.Text = "Anak-anak" Then
PictureBox1.Image = Image.FromFile(Application.StartupPath & "\ana.jpg")
ElseIf ComboBox1.Text = "Orang Tua" Then
PictureBox1.Image = Image.FromFile(Application.StartupPath & "\Ayah.jpg")
Else
PictureBox1.Image = Image.FromFile(Application.StartupPath & "\Udin.jpg")
End If
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles Button1.Click
If sender.tag = 1 Then
PictureBox1.Image = Nothing
ComboBox1.Text = ""
RadioButton1.Checked = False
RadioButton2.Checked = False
Else
PictureBox1.Image = Nothing
ComboBox1.Text = ""
RadioButton1.Checked = False
RadioButton2.Checked = False
End If
End Sub
End Class