https://blog.csdn.net/zaocha321/article/details/52528279 using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace WindowsApplication1 { public par…
WPF提供了选择文件对话框,但并没有提供选择文件夹的对话框. OpenFileDialog类存在于PresentationFramework.dll程序集. public string SelectFileWpf() { var openFileDialog = new Microsoft.Win32.OpenFileDialog() { Filter = "Text documents (.txt)|*.txt|All files (*.*)|*.*" }; var result =…
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace TestFolderBrowserDialog { public partial class Form1 : Form { public Form1(…
Sub XXX() Dim arr() arr = Application.GetOpenFilename("所有支付文件 (*.xls;*.xlsx;*.csv),*.xls;*.xlsx;*.csv,Excel 文件 (*.xls),*.xls,Excel2007 文件 (*.xlsx),*.xlsx,CSV 文件 (*.csv),*.csv", , "选择文件", , True) For i = LBound(arr) To UBound(arr) Cells…
java swing 选择文件夹对话框 import java.io.File; import javax.swing.JFileChooser; public class Test2 { public static void main(String[] args) { JFileChooser jf = new JFileChooser(); jf.setSelectedFile(new File("c:\\我的报表.xls")); int value = jf.showSaveDi…