请问 在 imageList 中如何设置和使用KEY值
我的测试代码如下
ResourceManager rm = new ResourceManager ( "资源文件制作.My" , Assembly.GetExecutingAssembly ( ) ) ;
string a2 ;
a2="a1";
Icon icoDemo = ( ( Icon ) rm.GetObject ( a2 ) ) ;
imageList2.Images.Add(icoDemo);
this.button1.Image = imageList2.Images[1] ;
先是从资源文件中读取图标,然后将图标赋予到imagelist中,我的问题是,这时候如何设置KEY值,以及如何用KEY值读出imageList中的图标,谢谢,
我的测试代码如下
ResourceManager rm = new ResourceManager ( "资源文件制作.My" , Assembly.GetExecutingAssembly ( ) ) ;
string a2 ;
a2="a1";
Icon icoDemo = ( ( Icon ) rm.GetObject ( a2 ) ) ;
imageList2.Images.Add(icoDemo);
this.button1.Image = imageList2.Images[1] ;
先是从资源文件中读取图标,然后将图标赋予到imagelist中,我的问题是,这时候如何设置KEY值,以及如何用KEY值读出imageList中的图标,谢谢,
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货