PDA

View Full Version : مشکل در ارسال عکس به استیمول



programerinfonet
دوشنبه 21 بهمن 1392, 09:51 صبح
سلام دوستان
من با این کد میخوام یک عکس که آدرس از ستون 10 یک گرید هست رو به استیمول بفرستم اما خطای زیر روی میده

PictureBox pic = new PictureBox();
pic.Load(dataGridView1.CurrentRow.Cells[10].Value.ToString());
Image Img = pic.Image;
byte[] inputImage = new byte[Img.Width * Img.Height];
System.IO.MemoryStream ms = new System.IO.MemoryStream();
ms.Read(inputImage, 0, Img.Width * Img.Height);
pic.SizeMode = PictureBoxSizeMode.StretchImage;
StiReport report = new StiReport();
report.Load(Application.StartupPath + @"\IDCart.mrt");
(report.GetComponentByName("Image4") as StiImage).Image = Img;
report.Compile();
report.Show();

116592