如何将图像保存到打开文件对话框打开的项目 [英] How to save a image to project opened with open file dialog
本文介绍了如何将图像保存到打开文件对话框打开的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,请帮帮我,我的表格上有打开文件对话框,现在我想将图像保存到我打开的对话框帮助项目中的文件夹中,我该怎么做?
解决方案
你可以试试相对路径,设置你需要将图像保存到应用程序文件夹下的Images文件夹然后,将InitialDirectory设置如下
openFileDialog.InitialDirectory = Path.Combine(Application.StartupPath,
@ 图像跨度>);
Hi All,please help me,i have open file dialog on my form,now i want to save the image to a folder in my project opened with the help of open dialog box,how can i do this?
解决方案
you can try with relative path, set you need to save images to "Images" folder under your application folder then, set InitialDirectory as below
openFileDialog.InitialDirectory = Path.Combine(Application.StartupPath, @"Images");
这篇关于如何将图像保存到打开文件对话框打开的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文