~~已知图片文件夹的路径~要把里面的图片依次全部显示到listview中~~
下面是乱码~0- -~~大大们~~帮忙
string[] files = System.IO.Directory.GetFiles(strPath);
//string[] files = System.IO.Directory.GetFiles(Application.StartupPath + "\\pic\\");
if(files.Length <1)return;
for (int i = 0; i < files.Length; i++)
{
if (files[i].Substring(files[i].Length - 3, 3) == ".db") continue;
Image MyIma;
MyIma = new Bitmap(files[i]);
Bitmap newPic = new Bitmap(64, 72);
Graphics g = Graphics.FromImage(newPic);
g.DrawImage(MyIma, 0, 0, 64, 72);
g.Dispose();
//this.listView1.StateImageList
// this.pictureBox1.Image = newPic;