samedi 27 mars 2021

How to use If with listBox1.SelectedItem to change a picture box

So I want a Listbox and when u press an element in the list box the picture box changes the picture so i have 4 picture boxes behind each other and I want to do

If listBox1.SelectedItem "Flowers" Then
pictureBox1.Show():
pictureBox2.Hide();
pictureBox3.Hide();

but iI keep getting an error I can't use if with selected item help

im using c# winfroms .net frameworks

Aucun commentaire:

Enregistrer un commentaire