TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
x _sanctus
NA
10
0
problem copying image
Oct 23 2005 9:28 PM
I create application where user change their picture i have a PictureBox foto where user's old image viewed. when the user upload new image the new image will be resized, viewed in the picture box and overwrite the old image (the filename is the same with the old one) The problem is i cannot the old picture because it said that it is still used, therefore i got exception "generic GDI+ error". But when the user uploaded the image for the 2nd time there is no exception. How can i solve this problem?? thisis the procedure to upload the image private void openFotoDialog_FileOk(object sender, System.ComponentModel.CancelEventArgs e) { try { System.Drawing.Size size=new Size(90,90); Image tempImage; tempImage=new Bitmap(Image.FromStream(openFotoDialog.OpenFile()),size); this.foto.Image=tempImage; //if(File.Exists(this.picFolderPath+Login.userNim+".jpeg")) //File.Delete(this.picFolderPath+Login.userNim+".jpeg"); tempImage.Save(this.picFolderPath+Login.userNim+".jpeg",ImageFormat.Jpeg); this.statusProfil.Text="foto uploaded"; } catch(){ } }
Reply
Answers (
0
)
Running an animation from 3dmax
Problem with selecting individual ComboBox in an Array of ComboBox Control