1.粘贴到项目Properties中的Resources.resx中

base.m_bitmap = Properties.Resources.MeasuredisTool;

2.添加已有资源中的bmp图片

base.m_bitmap = new Bitmap(GetType(), "Resources.MeasuredisTool.bmp");

注意第二种方式要GetType的类对应的命名空间应该跟Resources文件夹在同一级别

C#添加资源的两种方式

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-20
  • 2021-12-16
  • 2021-12-28
  • 2021-09-14
猜你喜欢
  • 2022-12-23
  • 2022-01-17
  • 2022-12-23
  • 2022-03-08
  • 2021-11-30
  • 2021-07-17
  • 2021-07-13
相关资源
相似解决方案