Dynamically adding and loading image from Resources in C#

后端 未结 5 1929
太阳男子
太阳男子 2020-12-19 02:31

I have some images added to my solution, right now it is under the folder images\\flowers\\rose.png inside the solution explorer. I want a way to dynamically load this imag

5条回答
  •  清歌不尽
    2020-12-19 03:11

    You can open the Resource Editor (Solution Explorer, click on Resources.resx) and add the image there. Then you can simply access it as Bitmap with Properties.Resources.ImageId

    http://msdn.microsoft.com/en-us/library/3bka19x4(v=vs.100).aspx

提交回复
热议问题