About 537,000 results
Open links in new tab
  1. How to: Open files with the OpenFileDialog - learn.microsoft.com

    May 6, 2025 · The System.Windows.Forms.OpenFileDialog component opens the Windows dialog box for browsing and selecting files. To open and read the selected files, you can use the OpenFileDialog.OpenFile method, or create an instance of the System.IO.StreamReader class. The following examples show both approaches.

  2. c# - How do I use OpenFileDialog to select a folder? - Stack Overflow

    Here is a pure C# version, nuget-free, that should work with all versions of .NET (including .NET Core, .NET 5, WPF, Winforms, etc.) and uses Windows Vista (and higher) IFileDialog interface with the FOS_PICKFOLDERS options so it has the nice folder picker Windows standard UI. Update 2023/3/17: the class now support multiple selection.

  3. OpenFileDialog In C# - C# Corner

    An OpenFileDialog control allows users to launch Windows Open File Dialog and let them select files. In this article, we discussed how to use a Windows Open File Dialog and set its properties in a Windows Forms application.

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

    Feb 18, 2023 · You can open the OpenFileDialog that is in your Windows Forms program. The dialog will not open automatically and it must be invoked in your custom code.

  5. How to Open Folder Dialog in C# - Delft Stack

    Feb 2, 2024 · In this tutorial, you will learn the two different ways to open a folder dialog in C#. It’s important to deal with Folder Browser and Open File Dialogs to select files and folders when developing C# projects in Winforms. The folder dialogs are a part of the Windows API and are accessible to C# developers on the Windows platform.

  6. Winform : How to use Folder and Open File Dialog Controls using C#

    May 20, 2012 · When developing projects in Winforms, there will come a time when you will have to deal with Browser Folder and Open File Dialogs. This article will show you how to accomplish common tasks using those two controls in Windows Forms using C#.

  7. winforms - OpenFileDialog in C# - Stack Overflow

    How can I get the result (meaning the file name and its location) from an Open File Dialog? My code: private void selectFileButton_Click( object sender, EventArgs e ) { var selectedFile = selectFileDialog.ShowDialog(); //label name = fileName fileName.Text = //the result from selectedFileDialog }

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

    Displays a standard dialog box that prompts the user to open a file. This class cannot be inherited. 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 CommonDialog.ShowDialog method.

  9. Select A File With OpenFileDialog Using C# | C# Examples

    This example shows how to select a file using the OpenFileDialog dialog box. OpenFileDialog allows users to select files. It is found in System.Windows.Forms namespace and it displays the standard Windows dialog box.

  10. Windows Forms (WinForms) OpenFileDialog Box Tutorial with example in C# ...

    Jul 4, 2016 · In Windows Forms (WinForms) applications, the OpenFileDialog Box is used to select single or multiple files from the Windows Folders or Directories. explained with an example, how to use the Windows Forms (WinForms) OpenFileDialog Box control in C# and VB.Net.

  11. Some results have been removed
Refresh