c# 加载8张图片,picturebox只显示一个图片图像,在另外一个窗口一个一个看又是好的。
privatevoidpicClear(){xlpic0.Image=null;xlpiclb0.Text="";xlpiclb1.Text="";xlpiclb2.Te...
private void picClear() { xlpic0.Image = null; xlpiclb0.Text = ""; xlpiclb1.Text = ""; xlpiclb2.Text = ""; xlpic1.Image = null; xlpic2.Image = null; xlshow0.Visible = false; xlshow1.Visible = false; xlshow2.Visible = false; }
for (m = j; m < imgArr.Count; m++) { //byteFile = (byte[])getImgDs.Tables["GradeCollectionAll"].Rows[m]["img"]; byteFile = (byte[])imgArr[0]; ms = new MemoryStream(byteFile); img = System.Drawing.Image.FromStream(ms); ms.Close(); if (m == j)
{ xlpic0.Refresh(); xlshow0.Visible = true; xlpiclb0.Text = imgNameArr[0].ToString(); xlpic0.Image = img; } else if (m ==(j+ 1)) { xlpic1.Refresh(); xlshow1.Visible = true; xlpiclb1.Text = imgNameArr[1].ToString(); xlpic1.Image = img; } else if (m == (j + 2)) { xlpic2.Refresh(); xlshow2.Visible = true; xlpiclb2.Text = imgNameArr[2].ToString(); xlpic2.Image = img; }
求解释,这是为什么呀?谢谢。 展开
for (m = j; m < imgArr.Count; m++) { //byteFile = (byte[])getImgDs.Tables["GradeCollectionAll"].Rows[m]["img"]; byteFile = (byte[])imgArr[0]; ms = new MemoryStream(byteFile); img = System.Drawing.Image.FromStream(ms); ms.Close(); if (m == j)
{ xlpic0.Refresh(); xlshow0.Visible = true; xlpiclb0.Text = imgNameArr[0].ToString(); xlpic0.Image = img; } else if (m ==(j+ 1)) { xlpic1.Refresh(); xlshow1.Visible = true; xlpiclb1.Text = imgNameArr[1].ToString(); xlpic1.Image = img; } else if (m == (j + 2)) { xlpic2.Refresh(); xlshow2.Visible = true; xlpiclb2.Text = imgNameArr[2].ToString(); xlpic2.Image = img; }
求解释,这是为什么呀?谢谢。 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询