首页上一页 1 下一页尾页 2 条记录 1/1页
在书的240页的例子例子中,为什么我用imageList1.Images.Add(Image.FromFile( ));添加一个图片时,却说找不到路径呢
发表在C#图书答疑
2009-10-09
是否精华
是
否
版块置顶:
是
否
我想
namespace Test06
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
listView1.LargeImageList = imageList1;
imageList1.ImageSize = new Size(37,36);
imageList1.Images.Add(Image.FromFile("01.png"));
imageList1.Images.Add(Image.FromFile("02.png"));
listView1.SmallImageList = imageList1;
listView1.Items.Add("用一生下载你");
listView1.Items.Add("芸烨湘枫");
listView1.Items[0].ImageIndex = 0;
listView1.Items[1].ImageIndex = 1;
}
}
namespace Test06
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
listView1.LargeImageList = imageList1;
imageList1.ImageSize = new Size(37,36);
imageList1.Images.Add(Image.FromFile("01.png"));
imageList1.Images.Add(Image.FromFile("02.png"));
listView1.SmallImageList = imageList1;
listView1.Items.Add("用一生下载你");
listView1.Items.Add("芸烨湘枫");
listView1.Items[0].ImageIndex = 0;
listView1.Items[1].ImageIndex = 1;
}
}