dimanche 20 juin 2021

Windows Forms Image Resource

Im making a Random Generator with Windows Forms with Images and I use the random pick with resources pictureBox1.Image = Properties.Resources.heart; Now, the "heart" should get removed from the List, to prevent getting "heart" again. Here I thought, that I just use int firstCard = randomCard.Next(cards.Count); and I want to use the int firstCard as Properties.Resources.cards[firstCard], because behind Properties.Resources. comes the resource name. But the string doesnt work there, and I dont know how to fix that. Pls help.

Thank you Pults




Aucun commentaire:

Enregistrer un commentaire