Questions tagged [openfiledialog]

The OpenFileDialog is a (component) class in the .NET Framework that prompts the user to open one or multiple files.

The OpenFileDialog component allows users to browse the folders of their computer or any computer on the network and select one or more files to open. The dialog returns full path names of the files selected by user.

1068 questions
5
votes
7 answers

Is there an Open File dialog for Access 2010 64bit?

How do I get an Open File dialog for Access 2010 64bit? Normally I would use the common dialog control but that is 32bit and cannot be used with Access 2010 64 bit.
Greg Finzer
  • 6,714
  • 21
  • 80
  • 125
5
votes
4 answers

Unit test file reading method with OpenFileDialog c#

I have a function, that returns text file path and file content: public static Tuple OpenTextFile() { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog .Filter = "Text |*.txt"; bool? accept =…
AlIon
  • 347
  • 5
  • 25
5
votes
6 answers

Open a .txt file into a richTextBox in C#

I want to be able to open a .txt file up into a richtextbox in c# and also into a global variable i have made called 'notes' but don't know how to do this. This is the code i have at the moment: OpenFileDialog opentext = new OpenFileDialog(); if…
Chris Bacon
  • 995
  • 8
  • 30
  • 42
5
votes
0 answers

Closing a OpenFileDialog causes application to hang for 3-4 seconds

In my WPF application which uses the Caliburn.Micro and MahApps.Metro frameworks, i open instances of OpenFileDialog from the System.Windows.Forms namespace. After opening and closing this dialog, the rest of my application hangs for approximately 3…
BlackBox
  • 2,223
  • 1
  • 21
  • 37
5
votes
0 answers

Open/SaveFileDialog select CustomPlaces folder by default

We are using the CustomPlaces property of the Open/SaveFileDialog to show the users a variety of configured standard folders that they could use. What we would like now is to have the InitialDirectory property point to the created CustomPlaces…
Bernd Linde
  • 2,098
  • 2
  • 16
  • 22
5
votes
3 answers

Increase number of characters in filename field of GetOpenFileName file selection dialog

Our app allows multiple files to be selected in a file selection dialog which is shown via the GetOpenFileName function (this question also applies to folks using CFileDialog, etc...) There appears to be a limit to the number of characters that can…
Kevin Day
  • 16,067
  • 8
  • 44
  • 68
5
votes
1 answer

Mapped drives not visible on open dialog

I have a user that has Windows 10 and is saying that their mapped drives are not showing up on one machine specifically and only in my program. I am using a standard Microsoft.Win32.OpenFileDialog to allow the user to browse to a file to open. On…
sfaust
  • 2,089
  • 28
  • 54
5
votes
3 answers

My Documents Path Re-directing to OneDrive Path

I'll Start with the very simple code string fileName; // filename of file // get the filename using (OpenFileDialog openFileDialog = new OpenFileDialog()) { openFileDialog.InitialDirectory =…
ayyron_lmao
  • 99
  • 1
  • 9
5
votes
2 answers

Prevent Windows' open file dialog from checking read permission

I'm using MFC's CFileDialog to select a file. I'm only interested in the complete file path as my application is not going to open it directly. Though the file dialog denies selecting the file by stating: "You don't have read permission to open this…
Markus Nißl
  • 371
  • 3
  • 10
5
votes
2 answers

Mouse left button up event and openfiledialog

I have few images in a grid, then when i click a button, a "open file dialog" comes up.(of course, over the images) Microsoft.Win32.OpenFileDialog dlgOpenFiles = new Microsoft.Win32.OpenFileDialog(); dlgOpenFile.DoModal(); The images have a…
phm
  • 1,160
  • 1
  • 17
  • 29
5
votes
4 answers

OpenFileDialog - only display filenames that have no extensions

I have the following code in my C# program: OpenFileDialog fDialog = new OpenFileDialog(); fDialog.Title = "Open a file"; fDialog.Filter = "NCF files (*.ncf)|*.ncf|All files (*.*)|*.*|No Extensions (*.)|*."; I…
fraXis
  • 3,141
  • 8
  • 44
  • 53
5
votes
2 answers

How do I use the OpenFileDialog class such that it opens on the Network area as default?

How do I use the OpenFileDialog class (in C#, WPF etc.) such that it opens on the Network area as default? This does not work: OpenFileDialog openFileDialog1 = new OpenFileDialog(); openFileDialog1.InitialDirectory = "Network"; I also tried…
xarzu
  • 8,657
  • 40
  • 108
  • 160
5
votes
2 answers

How does one use OpenFileDialog in C# in visual Studio 2010

I have written a custom dialog (form) that I can use in a C# program that behaves much like a "File - Open" menu command and brings up a window where a user can select a file or directory. The question I have is this. It has "My Computer" as its…
xarzu
  • 8,657
  • 40
  • 108
  • 160
5
votes
2 answers

How to use OpenFileDialog

I have two forms named frmChooseDBase and frmMain. frmChooseDBase is for choosing a file(a database file). Once he's done choosing the database, frmMain will load the database chosen from frmChooseDBase. How can I do dat? any help. Here's my sample…
Fvcundo
  • 95
  • 2
  • 3
  • 11
5
votes
1 answer

Has anyone noticed that a WPF file dialog will pass a click through to the UI when double clicking to select a file?

I have some buttons on my WPF UI and I also need to choose files from time to time. I kept noticing strange problems where when I double-click an item in the file dialog, a button on the main UI would also get clicked. After experimenting, it…