I have created a button where it can upload all the pic files as well as the doc files and the PDF files in the system. Here is the code for the following:
if (dlg.ShowDialog() == DialogResult.OK)
{
pictureBox2.Image = Image.FromFile(dlg.FileName);
pictureBox2.SizeMode = PictureBoxSizeMode.Zoom;
currentFileName = dlg.FileName;
button2.Enabled = true;
}
}
But i have a error poping out when i want upload a doc files. First of all is it possible to upload a doc file? if yes, then i have a issues showing out of memory in the following line of code
pictureBox2.Image = Image.FromFile(dlg.FileName);