[英]Save Dialog in Mobile Application using C#
這是我的代碼
SaveFileDialog dialog = new SaveFileDialog();
if (dialog.ShowDialog() == DialogResult.OK)
{
aspectRatioPictureBox1.Photo.Save(dialog.FileName,
System.Drawing.Imaging.ImageFormat.Bmp);
}
dialog.Dispose();
我想使用用戶指定的名稱將文件默認保存在mypictures文件夾中
為什么要使用SaveFileDialog
? 提示用戶提供要保存的文件名,然后使用該文件MyPictures
文件保存到MyPictures
特殊文件夾中。
Environment.SpecialFolder special = Environment.SpecialFolder.MyPictures;
string MyPicturesLocation = Environment.GetFolderPath(special);
//prompt the user for file-name and save it to MyPicturesLocation here.
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.