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.
精彩评论