I may not want to update the image every time but I update other data
- #region SavePicProfile
- const string new_dir = @"E:\x\ProfilePIC\";
- //MessageBox.Show(openFDProfile.FileName);
- string extension = System.IO.Path.GetExtension(openFDProfile.FileName);
- string renamed_name = ID_Member_ + "" + extension;
- string fName = System.IO.Path.Combine(new_dir, renamed_name);
- if (File.Exists(fName))
- File.Delete(fName);
- System.IO.File.Copy(openFDProfile.FileName, fName);
- string msg = string.Format("Copied {0} to {1}", openFDProfile.FileName, fName);
- //MessageBox.Show(msg, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
- #endregion
System.IO.File.Copy(openFDProfile.FileName, fName); Additional information: Could not find file 'openFileDialog1'.
- //image Register
- openFDProfileImage_Regisrt.Title = "Insert an image ";
- openFDProfileImage_Regisrt.InitialDirectory = "C:\\Users\bishoe\\Downloads";
- openFDProfileImage_Regisrt.FileName = "";
- openFDProfileImage_Regisrt.Filter = "JPEG Image|*.jpg|GIF Image|*.gif|PNG Image|*.png";
- openFDProfileImage_Regisrt.Multiselect = false;
- if (openFDProfileImage_Regisrt.ShowDialog() != DialogResult.OK)
- return;
- //display image in pic box
- PicImage_Regisrt.ImageLocation =
- openFDProfileImage_Regisrt.FileName;



Rafnas T PRank #280 · 8.8K reputationPosted Aug 22, 2018, 8:33 PM EDT
bishoe nbRank #2,471 · 568 reputationPosted Aug 22, 2018, 9:09 PM EDT
Rafnas T PRank #280 · 8.8K reputationPosted Aug 22, 2018, 10:08 PM EDT