开发者

Save Dialog in Mobile Application using C#

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜