如何使这张打开的图片不仅仅是文件夹 [英] How to I make this open pictures not just folders

查看:118
本文介绍了如何使这张打开的图片不仅仅是文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试制作文件图片转换器程序,但是当我使用此代码时,它只找到文件夹而不是其他任何东西;我如何制作这个开放的节目/图片?



我尝试过:



FolderBrowserDialog fdb = new FolderBrowserDialog();

if(fdb.ShowDialog()== System.Windows.Forms.DialogResult.OK)

textBox1.AppendText (fdb.SelectedPath);

i am trying to make a file picture converter program but when i use this code it only finds folders not anything else; how do i make this open programs/pictures?

What I have tried:

FolderBrowserDialog fdb = new FolderBrowserDialog();
if (fdb.ShowDialog() == System.Windows.Forms.DialogResult.OK)
textBox1.AppendText(fdb.SelectedPath);

推荐答案

您需要获取所选文件夹中文件(名称)的列表;然后加载每个文件进行处理。



c# - 如何遍历c#.net目录中的所有文件? - Stack Overflow [ ^ ]
You need to get a "list" of the file (names) in the selected folder; then load each file for processing.

c# - How to loop through all the files in a directory in c # .net? - Stack Overflow[^]


也许您应该尝试使用OpenFileDialog而不是FolderBrowserDialog。
Maybe you should try the OpenFileDialog instead of the FolderBrowserDialog.


这篇关于如何使这张打开的图片不仅仅是文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆