如何在Combobox的解决方案目录中创建文件夹 [英] How Do I Create A Folder In Solution Directory From Combobox
问题描述
亲爱的编程人才
hi
i急需帮助创建一个文件夹,其中包含组合框的名称和解决方案目录中的文本框值,并放入将pictureBox图像放入文件夹中,如果文件夹已经创建,则不会重新创建然后将图像直接复制到旧文件夹中
主文件夹是(\Images
comboBox1,用于目录名称 \ images \comboBox1.selectedItem
comboBox2用于名称子目录 \ images \comboBox1.selectedItem\comboBox2.selectedItem
textbox1用于放置子子目录的名称 \ images \comboBox1.selectedItem\comboBox2.selectedItem\textBox1.text
picturebox1是一个用于保存的图片
\images \comboBox1.selectedItem\comboBox2.selectedItem\textBox1.text\ * .jpg
buttom1是来自文件的获取图像(openfiledialog)
buttom2是从组合和文本Box值创建的子子目录的保存图像
< b> 例如
combo1 =牛津大学(大学名称)
combo2 =软件工程(家务的名字)
textbox = Albert anistain (教授的名字)
pictureBox1 =考试题材的A4图片
非常感谢你的帮助
上帝保佑你们所有人
您需要一种方法,例如:
string dir = path;
if (Directory.Exists(dir)== false )Directory.CreateDirectory(dir) ;
dear programming talents
hi
i Need urgent help to create a folder with the name of the combo box and text box values in solution directory, and put the pictureBox image into the folder and if folders Already created , it does not re-create And then copy the image directly into the old folders
The main folder is ( \Images
comboBox1 for names of directory \images\"comboBox1.selectedItem"
comboBox2 for names of sub-directory \images\"comboBox1.selectedItem"\"comboBox2.selectedItem"
textbox1 for put the names of sub-sub-directory \images\"comboBox1.selectedItem"\"comboBox2.selectedItem"\"textBox1.text"
picturebox1 is an image for save
\images\"comboBox1.selectedItem"\"comboBox2.selectedItem"\"textBox1.text"\*.jpg
buttom1 is a get image from file (openfiledialog)
buttom2 is a save image to a created sub-sub-directory from combo's and text Box values
for exampel
combo1 = oxford university ( name of university )
combo2= software engineering ( name of chores )
textbox = Albert anistain ( name of Professor )
pictureBox1 = A4 images of Examination questions
Many thanks for your help
God bless all of you
You need a method such as:
string dir ="path"; if(Directory.Exists(dir)==false) Directory.CreateDirectory(dir);
这篇关于如何在Combobox的解决方案目录中创建文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!