开发者

Save Dialog in Mobile Application using C#

开发者 https://www.devze.com 2023-01-05 04:21 出处:网络
Here is my code SaveFileDialog dialog = new SaveFileDialog(); if (dialog.ShowDialog() == DialogResult.OK)

Here is my code

     SaveFileDialog dialog = new SaveFileDialog();
      if (dialog.ShowDialog() == DialogResult.OK)
      {
         aspectRatioPictureBox1.P开发者_运维百科hoto.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


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.
0

精彩评论

暂无评论...
验证码 换一张
取 消