日期:2014-05-16 浏览次数:21180 次
string currentPath = System.IO.Directory.GetCurrentDirectory();//路径到\bin\Debug
string[] strArray = currentPath.Split(new string[] { @"\bin" }, StringSplitOptions.RemoveEmptyEntries);
string basepath = currentPath.Split(new string[] { @"\bin" }, StringSplitOptions.None)[0];
string picPath = basepath + "\\pic\\移交的工程资料.png";
this.pictureBox1.SizeMode = PictureBoxSizeMode.Normal;
this.pictureBox1.Image = Image.FromFile(picPath);
this.pictureBox1.Dock = DockStyle.Fill;
string picPath2 = basepath + "\\pic\\档案示例.png";
this.pictureBox2.SizeMode = PictureBoxSizeMode.StretchImage;
this.pictureBox2.Image = Image.FromFile(picPath2);
this.pictureBox2.Dock = DockStyle.Fill;