I am developing a mobile device application which has an OpenFileDialog control which copies an image into a PictureBox, code as follows:
Expand|Select|Wrap|Line Numbers
- 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)