Click here to Skip to main content
16,015,351 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I want to save the picture in the PictureBox to the path of my picture / picture but I am constantly getting an error.

I received the error:

Http://i.hizliresim.com/Np116Y.png
System.Runtime.InteropServices.ExternalException:

How can I find the document path because each user's name is different on each computer?

Thank you.

What I have tried:


Http://i.hizliresim.com/Np116Y.png
Posted
Updated 27-Mar-17 14:33pm
Comments
Richard Deeming 28-Mar-17 11:19am    
The Visual Studio exception helper includes a button to copy the exception to the clipboard. Use that, and then click "Improve question" and replace the screen-shot link with the copied exception details.

You'll also need to include the relevant parts of your code.
Richard Deeming 28-Mar-17 11:22am    
As far as I can tell, the error message in your screen-shot translates to "There was a general error in GDI+".

Unfortunately, that's a generic error message that GDI+ throws whenever anything goes wrong, and it doesn't give you any details to help resolve the issue.

One thing to check: Are you trying to save the image to the same path you loaded it from?

1 solution

@"" is a literal string - you don't need to use \\. This link explains the difference between C# standard and literal strings: String literals (C#)[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900