openfiledialog

Is there anyway to change title of OpenFileDialog in Silverlight 3?

Hi, I'm using OpenFileDialog in a Silverlight 3 application (sample code below). OpenFileDialog dialog = new OpenFileDialog(); dialog.Multiselect = false; dialog.Filter = "XML Schemas (*.xsd)|*.xsd"; dialog.ShowDialog(); It was a surprise to me that there's no such property like 'Title' to...

OpenFileDialog directing to a file 2 directories back

I'm having problems in visual basic programming. Currently I open a file using an open file dialog window and navigating to a file to open it. I want to be able to write a simple line saying ( and this is the best way I can describe it), Open this file "....\users.text". Please can someone help? ...

Remove places bar in OpenFileDialog C#

Is there a way to do it? ...

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 seems that if you line up an item in the file dialog with a button behind it on the main UI an...

Changing directory in Open File Dialog programatically.

Hi All, I have a customized OpenFileDialog (VS2008, C#, Windows Forms) with a ComboBox. The ComboBox will have a list of paths which the user can select. My question, is there a way I can change the directory in Open File Dialog to point to the path in the combobox selected item. InitialDirectory works only before I open the dialog, I...

Is it possible to have file filters for multiple extension types?

I'm using a standard Windows FileDialog to allow the user to select some files. I'd like to filter out only the file types I'm interested in though (lets call them *.a and *.b). Is there any way to do this without using *.*? I've tried the following but it fails to match any files at all: this->openFileDialog1->DefaultExt = L"*.a,*.b"; ...

folder dialog in c# asp.net

is there a folder dialog control in asp.net? i want the user to press a button and select a folder (not a file). i tried using the input in this way: <input type="file" runat="server" id="d" /> but it enabled me to browse a file and not a folder. any help? ...

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 root. How can I have it so that it searches on a Network? If the file or directory is loc...

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 having "\" as an InitialDirectory and that did not work. I also tried having "\\" as an I...

OpenFileDialog - only display filenames that have no extensions

Hello, 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 want to be able to have the user pick from the following: .NCF (files with .NCF e...

Silverlight file upload - file is in use by another process (Excel, Word)

Hi, all. I have a problem with uploading of the file in Silverlight application. Here is a code sample. In case when this file is opened in other application (excel or word for example) it fails to open it, otherwise it's working fine. I'm using OpenFileDialog to choose the file and pass it to this function. private byte[] GetFileCo...

Wxpython cut copy paste and openfiledialog...

i have a web browser made in python with menu. in one menu i have cut copy paste but no functionality and i need to make them work. i need an example of class oncopy.(event menu) Open file i manage to work like this .takes file and print on screen the link to that file but how can make open dialog to open a file at least one type of fil...

Open archive file content in OpenFileDiaolg C#

Hi All, I want an Open File Dialog with *.class ,*.jar filters. I want that *.jar files will be treated as folders (pressing OK or double-click should display the jar file content [ *.class] ). This capability is very similar to the TotalCommander archive plugin that let you browse inside archive files in-place (without the need to extr...

OpenFileDialog.AutoUpgradeEnabled doesn't work under Vista or 7?

If I specify OpenFileDialog.AutoUpgradeEnabled = true, my program still shows the old XP-style dialog. Any idea why this would happen? This is after I enable theming in Main() [STAThread] static void Main() { Application.EnableVisualStyles(); Application.Run(new Primary()); } and this is my dialog code: private void OpenProgr...

Upgraded to Silverlight 4 cause System.Security.SecurityException

Trying to open a file dialog but I get an exception when calling ShowDialog. This pice of code have always worked fine but I think when I upgrade to Silverlight 4 it caused some problem. Code: var dlg = new OpenFileDialog { Filter = "CSV Files (*.csv)|*.csv" }; if (dlg.ShowDialog() == true) { Upload(dlg.File); } Exception: Di...

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 LeftButtonUp event attached. The problem is that if i select a file by double clicking it, the o...

Why the current working directory changes when use the Open file dialog in Windows XP ?

I have found an strange behavior when use the open file dialog in c#. If use this code in Windows XP the current working directory changes to the path of the selected file, however if you run this code in Windows 7 the current working directory does not change. private void button1_Click(object sender, EventArgs e) { ...

File Upload in SilverLight?

HI I Try Upload a file in Silver-Light. for doing this I use System.IO.File to read file bytes and then send the data to service to insert that data as file data in Database. (Blow Code) byte[] data; OpenFileDialog open = new OpenFileDialog(); open.Filter = "Excel Files (*.xlsx)|*.xlsx"; if (open.ShowDial...

Using a ControlTemplate to display a "browse" button beside a textbox used for filenames

Hi, I am attempting to attach a "Browse" button to a number of textboxes that will contain filenames. I was aiming for something like this: <TextBox Text="c:\Filename.txt" Template="{StaticResource FileBrowser}"/> The control template I declared is as follows: <Window.Resources> <ControlTemplate x:Key="FileBrowser" TargetType="...

ASP.NET file browser get filepath

I'm using an <input type="file" /> as a file browser dialog in MVC. I don't actually want to upload the file though, I am using it to select a template on a shared drive. I only want to get the full filepath in my action method. The server will then process the file and force download to the client. I have got hold of the HttpPostedFile...