openfiledialog

File Open Dialog with Encodings combobox under Vista.

I currently use the TOpenTextFileDialog as it has the Encodings option, but under Vista it appears using the older open dialog style. I'd like the new style open dialog, but with an encoding combobox that I can fill with custom strings. Basically I want the exact open dialog that Notepad shows under Vista. Of course I also need the co...

OpenFileDialog does not browse the folders under .NET CF

I have an WinMo app and I would like to open a file from the storage card. The file is NOT in the root but within the folder structure. I thought OpenFileDialog would do the trick just as it does under regular .NET. But it does not offer me to navigate over the folders. I looks really lame. Or am I just outstandingly stupid? ...

Setting the start position for OpenFileDialog/SaveFileDialog

For any custom dialog (form) in a WinForm application I can set its size and position before I display it with: form.StartPosition = FormStartPosition.Manual; form.DesktopBounds = MyWindowPosition; This is particularly important when dealing with multiple monitors. Without such code, when you open a dialog from an application that you...

When does Microsoft.Win32.OpenFileDialog.ShowDialog() return null?

OpenFileDialog's ShowDialog method returns a nullable boolean, set to true if the user clicked OK or false if he clicked Cancel. When does it return null? The documentation does not say. ...

Saving the filepath of a .txt file

I need my application to ask the user to browse to a particular file, save that files location and subsequently write a string from a TextBox to it. However, I only need my end-user to browse to the file the first time the application launches. Only once. Here lies my dilemma, how can I have my application remember if it was the first ...

Opening multiple files (OpenFileDialog, C#)

Hi all, i'm trying to open multiple files at once with the OpenFileDialog, using FileNames instead of FileName. But I cannot see any examples anywhere on how to accomplish this, not even on MSDN. As far as I can tell - there's no documentation on it either. Has anybody done this before?? ...

Getting filesize from OpenFileDialog?

How can I get the filesize of the currently-selected file in my Openfiledialog? ...

Does OpenFileDialog.Filenames have a limit?

I have a small helper app that I use to "inject" scripts into html pages. I have an openfiledialog promt and i select all the html files in that directory (1403 files) and no matter what i do i see that OFD.filenames.count = 776 is there a limit? thanks OpenFileDialog OFD = new OpenFileDialog(); OFD.Multiselect = true; ...

Is it never possible to get the FullName from a file using Silverlight OpenFileDialog?

Hi there, I want to get the fullname from a file on Silverlight OpenFileDialog, when I try that, Silverlight throws me an error. I saw there is an attribute on FullName saying it is [SECURITY CRITICAL], but I need to display the full path, is it really no way I can do that? Please help. Thanks ...

Simple silverlight open-file-dialog errors

A while back I wrote a silverlight user control which had a csv import/export feature. This has been working fine, until recently I discovered it erroring in one scenario. This may have been due to moving to Silverlight 3. The Error: Message: Unhandled Error in Silverlight 2 Application Code: 4004 Category: ManagedRuntimeError Message:...

OpenFileDialogs on C# MTAThread application.

Ok, I know that OpenFileDialogs needs STAThread, but i want to start the form from a console application, so I create a Thread for the Form that way I can print things to the console while working with the form, the problem is that if I want to use OpenFileDialogs then I can not print to the console! ...

Open a web folder (Sharepoint 2007)through openFileDialog

I have the following snippet of code written in C#: openFileDialog1.InitialDirectory = "\\\\fwm-storage\\users\\" + curUser + "\\My Documents\\My Pictures"; openFileDialog1.Filter = "All Files (*.*)|*.*|Images (*.jpg)|*.jpg"; openFileDialog1.FilterIndex = 2; // blah, blah, blah Which works great and all, but, I want to be able to add...

MFC Open Folder Dialog

In MFC, is there an Open Folder Dialog? That is, rather than choosing a filename, it chooses a folder name? Ideally, I'd like it to be the way Visual Studio does it when navigating for a "Project Location" (when creating a new project), which looks very much like a normal file dialog. But I could make do with one of the vertical tree sor...

WPF OpenFileDialog with the MVVM pattern?

I just started learning the MVVM pattern for WPF. I hit a wall: what do you do when you need to show an OpenFileDialog? Here's an example UI I'm trying to use it on: When the browse button is clicked, an OpenFileDialog should be shown. When the user selects a file from the OpenFileDialog, the file path should be displayed in the text...

C# OpenFileDialog Lock To Directory

Hello everyone! I am making a software that needs to ONLY be able allow people to select files and folders using the OpenFileDialog that are in the same directory as the program and that are in deeper folders. I don't want the OpenFileDialog to be able to select stuff outside of the program's current directory. Is this possible to do in ...

Open File Dialog Box

Hello, I'm learning Objective-C and trying to develop a simple zipper application, but I stopped when now, when I need to insert a button at my dialog and this button opens a Open File Dialog that will select a file to compress, but I never used a Open File Dialog, then how I can open it and store the user selected file in a char*? Than...

Silverlight OpenFileDialog DoEvents equivalent

I'm processing large files after they are selected by the user. My code looks like the following: if (FileDialog.ShowDialog() == true) { // process really big file } This freezes up the UI so I tried to display a loading message first before a user selected the file to give them a visual cue that something was happening: loadi...

Weird acting loop in C#

Note: I added actual code snippets. Just scroll to end. // files is created by a OpenFileDialog. public void Function(String[] files, ...) { for(int i; i<files.Length; i++) { WriteLine("File " + i + "/" + files.Length + " being processed."); //... processing for a long time and printing information to console ... }...

Obtain the true name of the currently select file in the common file dialog?

One can get the text of the selected item in the list-view of a common dialog. But one can NOT get its PIDL, and if the user has chosen to hide known extensions (the default), then one cannot really tell what file was selected without either its extension or its PIDL. So possible ways to solve this might be: Obtain an IShellView fr...

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? ...