C#关 于 picturebox和 imagelist的 用 法 using System; using System
Collections
Generic; using System
ComponentModel; using System
Data; using System
Drawing; using System
Linq; using System
Text; using System
Windows
Forms; namespace TExt1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } int i; //系 统 当 前 有 一张默认图片 private void Form1_Load(object sender, EventArgs e) { if (imageList1
Images
Count >= 1) { pictureBox1
Image = imageList1
Images[0]; } i = -1; } //增 加 图 片 private void button1_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd
InitialDirectory = "E:"; ofd
Filter = "图 像 |*
jpg"; ofd
RestoreDirectory = true; ofd
FilterIndex = 1; String fName; if (ofd
ShowDialog() == DialogResult
OK) { fName = ofd
FileName; Image myImage = Image