vivek.v
vivek.v

Reputation: 11

Save Dialog in Mobile Application using C#

Here is my code

     SaveFileDialog dialog = new SaveFileDialog();
      if (dialog.ShowDialog() == DialogResult.OK)
      {
         aspectRatioPictureBox1.Photo.Save(dialog.FileName,
          System.Drawing.Imaging.ImageFormat.Bmp);
      }
      dialog.Dispose();

I want to save the file in mypictures folder defaultly with the name given by user

Upvotes: 1

Views: 269

Answers (1)

this. __curious_geek
this. __curious_geek

Reputation: 43207

Why use SaveFileDialog ? Prompt the user to provide file-name to save and save the file to MyPictures special folder with that file-name.

Environment.SpecialFolder special = Environment.SpecialFolder.MyPictures;
string MyPicturesLocation = Environment.GetFolderPath(special);

//prompt the user for file-name and save it to MyPicturesLocation here.

Upvotes: 1

Related Questions