using System;
using System.Drawing;
using System.Windows.Forms;
using System.IO;
namespace GetName
{
public partial class Form1 : Form
{
string sourcePath;
//桌面路径
string outPutPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Desktop) + "\\" + "FileNames.txt";
public Form1()
{
InitializeComponent();
this.FormBorderStyle = FormBorderStyle.FixedSingle;
this.StartPosition = FormStartPosition.CenterScreen;
//设置透明窗口
this.BackColor = Color.White;
this.TransparencyKey = Color.White;
this.Opacity = 0.6;//透明度
}
private void button1_Click(object sender, EventArgs e)
{
//弹出文件夹选择框
var source = new FolderBrowserDialog();
source.Description = "请选择源路径"
Winform小应用 获取指定文件夹内的所有子文件名字
最新推荐文章于 2024-01-19 10:13:15 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)