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
2 answers

Remove places bar in OpenFileDialog C#

Is there a way to do it?
Vince
  • 81
  • 1
  • 4
5
votes
3 answers

Does OpenFileDialog InitialDirectory not accept relative path?

dialog is an OpenFileDialog class object, and I am using ShowDialog() method. When I use path containing relative path, like: dialog.InitialDirectory = "..\\abcd"; dialog.InitialDirectory = Directory.GetCurrentDirectory() + "..\\abcd"; ShowDialog()…
Marson Mao
  • 2,935
  • 6
  • 30
  • 45
5
votes
1 answer

How to disable automatic appending of wildcard pattern in Vista file open dialog

I'm using a file open dialog to chose image files for further editing. The filter list contains an "All supported formats" entry which represents a long list of file formats. Since Vista automatically appends the wildcard patterns in the filter…
5
votes
1 answer

Excel VB Open File OSX and Windows

I've got a spreadsheet that uses some basic code to get the user to select a file (txt file). It works flawlessly on Windows but fails on OSX obviously due to the difference in FileDialog calls. I've done some research though and can't seem to find…
Flatlyn
  • 2,040
  • 6
  • 40
  • 69
5
votes
1 answer

Set 'My Computer' location on a OpenFileDialog (WindowsAPICodePack)

I would like to set the InitialDirectory property of a WindowsAPICodePack CommonOpenFileDialog to My computer Location, I did it using the equivalent CLSID or GUID or what the hell is that, just I would like to know if exist a more native/safe way…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
5
votes
3 answers

Initial directory for OpenFileDialog

The file dialog has to open the last directory location that was used before it was shut down, but I have no idea how to do this. My colleague only shows me the example of word, when you click "file" it shows the last used files, he told me to use a…
Cas Nouwens
  • 395
  • 1
  • 5
  • 25
5
votes
1 answer

changing button text in OpenFileDialog in C#.net

Does anyone knows how to change text on button in OpenFileDialog in Windows.Forms in C#.NET?
Bart Socha
  • 65
  • 1
  • 7
5
votes
3 answers

Is it possible to lock top and left hand navigation in OpenFileDialog box in C#?

I am having difficulty in customizing OpenFileDialog box, I want to allow people to select files that are in the same directory from the currently open folders using the OpenFileDialog. I don't want the OpenFileDialog to be able to select stuff…
5
votes
4 answers

Keep opening OpenFileDialog until selecting valid file

I have code that opens the OpenFileDialog, I'm checking the size of the file to make sure it doesn't exceed specific limit. But, if the user selected a big sized file I need to warn him and lead him back to the dialog to select a different file or…
Nour
  • 5,252
  • 3
  • 41
  • 66
5
votes
2 answers

OpenFileDialog: Difference between FileNames and SafeFileNames

For OpenFileDialog, What are the differences between SafeFileNames and FileNames? and Why is SafeFileNames is safe?
dance2die
  • 35,807
  • 39
  • 131
  • 194
5
votes
1 answer

Why OpenFileDialog RestoreDirectory not implemented?

I'm using Microsoft.Win32.OpenFileDialog in my wpf application since it is stated as equivalent here; http://msdn.microsoft.com/en-us/library/ms750559.aspx I set the RestoreDirectory property to true, but it has no effect. When I wait on the…
AFgone
  • 1,172
  • 4
  • 16
  • 31
4
votes
3 answers

How to create customized open file dialog in C#

How can one create a user control that has the same functionality (along with some extended features) of OpenFileDialog in C#? I've followed this, but I could not find a solution for my problem. My requirement is to add an extra button in the…
Thorin Oakenshield
  • 14,232
  • 33
  • 106
  • 146
4
votes
4 answers

Need a dialog box to browse computers on a network

The FolderBrowserDialog does allow me to browse computers on the network, but it displays other unnecessary folders (I don't want local folders). Also, I don't want to have to select a folder - just the computer name.
goku_da_master
  • 4,257
  • 1
  • 41
  • 43
4
votes
1 answer

How do I create an open file dialog in a xcode cocoa project?

I'm looking for an equivalent to GetOpenFileName function for Windows.
sashoalm
  • 75,001
  • 122
  • 434
  • 781
4
votes
1 answer

How to get open file popup

Right now, I have a set class path, but I want to have an open file pop up and the user chooses which file to open. I've tried JFileChooser, but haven't been successful so far. Here's my code: public static void main(String[] args) throws…
lrvilnius
  • 107
  • 1
  • 3
  • 8