I am creating an Interactive map which displays the facilities when the user clicks on the Checkbox, such as toilets. It will display all the toilet locations via PictureBoxes. I want to do this without having to write all this code?
Private Sub chkCash_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkCash.CheckedChanged
If chkToilet.Checked And RadioButton1.Checked Then
PictureBox1.Visible = True
PictureBox2.Visible = True
PictureBox3.Visible = True
PictureBox4.Visible = True
Else
PictureBox1.Visible = False
PictureBox2.Visible = False
PictureBox3.Visible = False
PictureBox4.Visible = False
End If
If chkToilet.Checked And RadioButton2.Checked Then
PictureBox5.Visible = True
PictureBox6.Visible = True
PictureBox7.Visible = True
PictureBox8.Visible = True
PictureBox9.Visible = True
Else
PictureBox5.Visible = False
PictureBox6.Visible = False
PictureBox7.Visible = False
PictureBox8.Visible = False
PictureBox9.Visible = False
End If
End Sub