About 1,830 results
Open links in new tab
  1. OpenFileDialog 类 (System.Windows.Forms) | Microsoft Learn

    示例 下面的代码示例创建一个 OpenFileDialog 、设置多个属性来定义文件扩展名筛选器和对话框行为,并使用该方法显示对话框 CommonDialog.ShowDialog 。 该示例需要一个窗体,其中包含一个 …

  2. C# OpenFileDialog对话框的用法(附带实例) - C语言中文网

    C# OpenFileDialog对话框的用法(附带实例) 文件编辑程序一般都有打开文件对话框,在这个对话框用户中可以选择文件并打开,工具箱也提供打开文件对话框功能让我们可以很方便地使用对话框来打开 …

  3. C# OpenFileDialog打开文件对话框(详解) - LuoTian - 博客园

    Mar 28, 2017 · 一、打开文件对话框 (OpenFileDialog) 1、 OpenFileDialog控件的基本属性 InitialDirectory:对话框的初始目录 Filter: 获取或设置当前文件名筛选器字符串,例如,"文本文件 …

  4. C#中openFileDialog控件的使用方法 - CSDN博客

    Apr 5, 2024 · 在C#中,OpenFileDialog控件用于创建一个打开文件对话框,允许用户选择文件。 OpenFileDialog提供了一种简单的方式来让用户选择一个或多个文件,并获取用户所选文件的路径。

  5. c#如何使用OpenFileDialog打开文件_c#OpenFileDialog打开文件的几 …

    6 days ago · OpenFileDialog.ShowDialog()返回值必须检查,正确做法是先判断DialogResult.OK(WinForms)或true(WPF)再访问FileName或FileNames,否则可能因用户取消 …

  6. Windows:内置对话框OpenFileDialog、SaveFileDialog …

    运行原理 OpenFileDialog 类封装了 Win32 的打开/保存文件对话框,可以轻松地访问其功能。 这只是一个实例化对象、设置一些属性(如文件类型(Filter 属性))并调用 ShowDialog 的问题。

  7. OpenFileDialog Class (System.Windows.Forms) | Microsoft Learn

    The following code example creates an OpenFileDialog, sets several properties to define the file extension filter and dialog behavior, and displays the dialog box using the …

  8. c#—OpenFileDialog(打开文件对话框) - CSDN博客

    Jun 18, 2018 · OpenFileDialog是什么? OpenFileDialog是一个类,实例化此类可以设置弹出一个文件对话框。 比如:我们发邮件时需要上传附件的时候,就会弹出一个让我们选择文件的对话框,我们可 …

  9. How to: Open files with the OpenFileDialog - learn.microsoft.com

    May 7, 2025 · Learn how to use the OpenFileDialog component to open the Windows dialog box for browsing and selecting files.

  10. C#.WinForms - OpenFileDialog Example - Dot Net Perls

    Feb 18, 2023 · OpenFileDialog This allows users to browse folders and select files. It can be used with C# code. It displays the standard Windows dialog box. The results of the selection made in …