Tuesday, 18 June 2013
Upload Images in windows application inc#
How to upload Images in windows application in C#
{
OpenFileDialog _OPF = new OpenFileDialog();
_OPF.Filter = "Image Files|*.jpg;*.gif;*.bmp;*.png;*.jpeg|All Files|*.*"; //"JPEG Files (*.jpeg)|*.jpeg|PNG Files (*.png)|*.png|JPG Files (*.jpg)|*.jpg|GIF Files (*.gif)|*.gif";
if (_OPF.ShowDialog() == DialogResult.OK)
{
Bitmap _img = new Bitmap(_OPF.FileName);
Size size = new Size(200, 150);
Bitmap bitmap = new Bitmap(_img, size);
folderPath = Application.CommonAppDataPath + "\\images\\" + _OPF.SafeFileName;
txtPhoto.Text = folderPath;
_LatestImage = folderPath.ToString();
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment