0

I have a button, and I want to change the image of it everytime it is clicked. The images are at the Resources. How do I call them?

btnIden.Image = //HERE ;

2 Answers2

0
btnIden.Image = global::WindowsFormsApp1.Properties.Resources.image

where

image

is a name of the file you uploaded without an extension. Or how do you call it in a project properties.

angrybambr
  • 108
  • 7
0

You just call the image in the resource by name

btnIden.Image = MyProject.Properties.Resources.img_name_in_resource
Antoine V
  • 6,998
  • 2
  • 11
  • 34