Hi there.
I am developing a mobile device application which has an OpenFileDialog control which copies an image into a PictureBox, code as follows:
That all works fine but what I also want to do is to email this image as an attachment of an email. This email functionality is within another Button click event as other fields in the mobile device form are included in the email as text.
Can anybody suggest some way(s) I can use to capture this image as an attachment, as well as displaying it in a picture box please?
Thank you.
M :o)
I am developing a mobile device application which has an OpenFileDialog control which copies an image into a PictureBox, code as follows:
Code:
try { OpenFileDialog open = new OpenFileDialog(); open.Filter = "Image Files(*.jpg; *.jpeg; *.gif; *.bmp)|*.jpg; *.jpeg; *.gif; *.bmp"; if (open.ShowDialog() == DialogResult.OK) { pbImage.Image = new Bitmap(open.FileName);pbImage.SizeMode = PictureBoxSizeMode.CenterImage; } } catch (Exception) { throw new ApplicationException("Failed loading image"); }
Can anybody suggest some way(s) I can use to capture this image as an attachment, as well as displaying it in a picture box please?
Thank you.
M :o)
Comment