Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The Windows Forms OpenFileDialog component is a pre-configured dialog box. It is the same Open File dialog box exposed by the Windows operating system. It inherits from the CommonDialog class.
Use this component within your Windows-based application as a simple solution for file selection in lieu of configuring your own dialog box. By relying on standard Windows dialog boxes, you create applications whose basic functionality is immediately familiar to users. Be aware, however, that when using the OpenFileDialog component, you must write your own file-opening logic.
Use the ShowDialog method to display the dialog at run time. You can enable users to multi-select files to be opened with the Multiselect property. Additionally, you can use the ShowReadOnly property to determine if a read-only check box appears in the dialog box. The ReadOnlyChecked property indicates whether the read-only check box is selected. Finally, the Filter property sets the current file name filter string, which determines the choices that appear in the "Files of type" box in the dialog box.
When it is added to a form, the OpenFileDialog component appears in the tray at the bottom of the Windows Forms Designer in Visual Studio.
.NET Desktop feedback feedback
.NET Desktop feedback is an open source project. Select a link to provide feedback:
Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Choose the best UI framework for a native Windows development project - Training
Windows developers have various options for creating applications that run on Windows. This module introduces the native Windows UI frameworks that are available for Windows development. It also provides guidance on how to choose the best framework for your application.