Hi,
Please say anyone how to use
PictureBox.Image.Save() Using C#
My requirement is to save the image which is in picture to Application Folder ... I mean the image is to be saved to the folder which is in the solution folder(Application.StartUpPath.. like that) and the path should be hotcoded...
PictureBox1.Image.Save() using C#
5 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Valarmathi V16 pointsPosted Oct 23, 2008, 3:02 AM EDT
vinod36 pointsPosted Oct 23, 2008, 5:35 AM EDT
But it is saving the image ....\bin\Debug\"MyImageFolder";
now i added a folder to my project(where we can see all the forms and forms.cs in Solution Explorer ). there in that folder can i save or place my image instead of saving the image at .....\bin\Debug\".." ?
Valarmathi V16 pointsPosted Oct 23, 2008, 10:24 PM EDT
I think u can't access ur project folder(where forms, forms.cs are stored) during runtime or after deployment.
It is accessible only during compile time.
SO you can access only the debug folder during runtime.
vinod36 pointsPosted Oct 23, 2008, 11:01 PM EDT
The main problem is
I created an xml in my application by MyWindowsApplication -> Add New Item -> XML File and created data in that. ok it's fine. But when ever iam trying to Load(XmlDocument.Laod) that XML using Application.StratUpPath it is going to ....\bin\Debug\... instead of getting MyXML which i have creaed recently. and it showing file not found error....
Am i clear in explaining my dought.. if not again i will expalin it clearly ..
Valarmathi V16 pointsPosted Oct 27, 2008, 8:51 PM EDT
Yes, Application.StartUpPath will go to debug folder only. usually we don't use the solution folder in runtime environment because of security issues.
if the XML files serves configuration information, you better include a configuration file.
if you are using xml file for some other purpose you have to give the location of the file. even though you are storing it in the solution folder (Project Name -> add new item -> XML file ) you need to give the full path.